fill up contact mail_from, from_header if possible

This commit is contained in:
Son NK 2020-09-14 18:22:26 +02:00
parent 8faae3d0d4
commit cb2033443c
1 changed files with 3 additions and 0 deletions

View File

@ -189,6 +189,8 @@ def get_or_create_contact(
website_email=contact_email, website_email=contact_email,
name=contact_name, name=contact_name,
reply_email=reply_email, reply_email=reply_email,
mail_from=mail_from,
from_header=contact_from_header,
) )
db.session.commit() db.session.commit()
except IntegrityError: except IntegrityError:
@ -249,6 +251,7 @@ def replace_header_when_forward(msg: Message, alias: Alias, header: str):
name=contact_name, name=contact_name,
reply_email=reply_email, reply_email=reply_email,
is_cc=header.lower() == "cc", is_cc=header.lower() == "cc",
from_header=addr,
) )
db.session.commit() db.session.commit()
except IntegrityError: except IntegrityError: