Still show a readable email name when there's no website_from

This commit is contained in:
Son NK 2019-12-23 14:57:55 +00:00
parent 3320a488f3
commit dbbfcac2d6
1 changed files with 2 additions and 2 deletions

View File

@ -533,9 +533,9 @@ class ForwardEmail(db.Model, ModelMixin):
if self.website_from:
name = get_email_name(self.website_from)
if name:
return name + " " + self.website_email + " " + f"<{self.reply_email}>"
return name + " " + self.website_email + f" <{self.reply_email}>"
return self.reply_email
return self.website_email.replace("@", " at ") + f" <{self.reply_email}>"
def last_reply(self) -> "ForwardEmailLog":
"""return the most recent reply"""