From 13c60c69f28389bffcc14125a96883d9055b28cd Mon Sep 17 00:00:00 2001 From: InviteMe Developer Date: Mon, 31 Aug 2026 15:03:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20nam?= =?UTF-8?q?e=20'email'=20is=20not=20defined=20=D0=BF=D1=80=D0=B8=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B5=20=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Добавлен импорт formatdate из email.utils --- app/services/email_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/email_service.py b/app/services/email_service.py index ca58950..f6af59a 100644 --- a/app/services/email_service.py +++ b/app/services/email_service.py @@ -3,7 +3,7 @@ import time from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.image import MIMEImage -from email.utils import formataddr +from email.utils import formataddr, formatdate from pathlib import Path from flask import current_app, render_template @@ -23,7 +23,7 @@ def _build_mime_message(to_address, subject, html_body, sender_name, attachments msg["Subject"] = subject msg["From"] = formataddr((sender_name, sender)) msg["To"] = to_address - msg["Date"] = email.utils.formatdate(localtime=True) + msg["Date"] = formatdate(localtime=True) msg.attach(MIMEText(html_body, "html", "utf-8")) for att in attachments: