website_email: use From header instead of envelope from

This commit is contained in:
Son NK 2019-12-09 22:15:46 +01:00
parent 29d48b7d0f
commit c37ba0e1de
2 changed files with 2 additions and 1 deletions

View file

@ -537,6 +537,7 @@ class ForwardEmail(db.Model, ModelMixin):
db.ForeignKey(GenEmail.id, ondelete="cascade"), nullable=False
)
# used to be envelope header, should be mail header from instead
website_email = db.Column(db.String(128), nullable=False)
# when user clicks on "reply", they will reply to this address.

View file

@ -88,7 +88,7 @@ class MailHandler:
user_email = gen_email.user.email
website_email = envelope.mail_from
website_email = msg["From"]
forward_email = ForwardEmail.get_by(
gen_email_id=gen_email.id, website_email=website_email