Add name to sender
Anirudh Oppiliappan x@icyphox.sh
Sat, 03 Apr 2021 19:06:20 +0530
2 files changed,
2 insertions(+),
2 deletions(-)
M
app/mail.py
→
app/mail.py
@@ -3,7 +3,7 @@ from . import mail
def send_mail(to, replyto, subject, html, text): - msg = Message(subject, sender="forlater@monkagi.ga", reply_to=replyto) + msg = Message(subject, sender="ForLater <forlater@monkagi.ga>", reply_to=replyto) msg.add_recipient(to) msg.html = html msg.body = text
M
config.py
→
config.py
@@ -1,7 +1,7 @@
import os class Config: - MAIL_DEFAULT_SENDER="saved@forlater.email" + MAIL_DEFAULT_SENDER="ForLater <saved@forlater.email>" MAIL_SERVER = "in-v3.mailjet.com" MAIL_USERNAME = os.environ.get("MAILJET_API_KEY") MAIL_PASSWORD = os.environ.get("MAILJET_SECRET_KEY")