Sfoglia il codice sorgente

Hide seperator from 'from header' if no name present

Sibren Vasse 5 anni fa
parent
commit
d7aae24ebb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      email_handler.py

+ 1 - 1
email_handler.py

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