Merge pull request #60 from SibrenVasse/master

Hide seperator from 'from header' if no name present
This commit is contained in:
Son Nguyen Kim 2020-01-30 00:01:50 +07:00 committed by GitHub
commit 4d7cd74190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -241,7 +241,7 @@ class MailHandler:
# replace the email part in from: header # replace the email part in from: header
from_header = ( from_header = (
get_email_name(msg["From"]) get_email_name(msg["From"])
+ " - " + ("" if get_email_name(msg["From"]) == "" else " - ")
+ website_email.replace("@", " at ") + website_email.replace("@", " at ")
+ f" <{forward_email.reply_email}>" + f" <{forward_email.reply_email}>"
) )