mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 15:53:22 +08:00
no need to modify reply-to. Remove this header if present.
This commit is contained in:
parent
a70928d166
commit
0ae7f2d68a
1 changed files with 12 additions and 5 deletions
|
@ -121,11 +121,18 @@ class MailHandler:
|
|||
if gen_email.enabled:
|
||||
# add custom header
|
||||
msg.add_header("X-SimpleLogin-Type", "Forward")
|
||||
try:
|
||||
msg.add_header("Reply-To", forward_email.reply_email)
|
||||
except ValueError:
|
||||
# the header exists already
|
||||
msg.replace_header("Reply-To", forward_email.reply_email)
|
||||
|
||||
# no need to modify reply-to as it is used in From: header directly
|
||||
# try:
|
||||
# msg.add_header("Reply-To", forward_email.reply_email)
|
||||
# except ValueError:
|
||||
# # the header exists already
|
||||
# msg.replace_header("Reply-To", forward_email.reply_email)
|
||||
|
||||
# remove reply-to header if present
|
||||
if msg["Reply-To"]:
|
||||
LOG.d("Delete reply-to header %s", msg["Reply-To"])
|
||||
del msg["Reply-To"]
|
||||
|
||||
# change the from header so the sender comes from @simplelogin
|
||||
# so it can pass DMARC check
|
||||
|
|
Loading…
Reference in a new issue