quickfix for "Reply-To is noreply+None@domain.tld"
This commit is contained in:
parent
9269f2ec48
commit
d6df034ad0
1 changed files with 4 additions and 4 deletions
|
@ -52,15 +52,15 @@ def collect_references(issue_thread):
|
|||
return references
|
||||
|
||||
|
||||
def make_reply(reply_email, references=None, event=None, issue_thread=None):
|
||||
def make_reply(reply_email, references=None, event=None):
|
||||
from email.message import EmailMessage
|
||||
from core.settings import MAIL_DOMAIN
|
||||
event = event or "noreply"
|
||||
event = event or "mail"
|
||||
reply = EmailMessage()
|
||||
reply["From"] = reply_email.sender
|
||||
reply["To"] = reply_email.recipient
|
||||
reply["Subject"] = reply_email.subject
|
||||
reply["Reply-To"] = f"{event}+{issue_thread}@{MAIL_DOMAIN}"
|
||||
reply["Reply-To"] = f"{event}@{MAIL_DOMAIN}"
|
||||
if reply_email.in_reply_to:
|
||||
reply["In-Reply-To"] = reply_email.in_reply_to
|
||||
if reply_email.reference:
|
||||
|
@ -207,7 +207,7 @@ Your c3lf (Cloakroom + Lost&Found) Team'''.format(active_issue_thread.short_uuid
|
|||
reply_email = Email.objects.create(
|
||||
sender=recipient, recipient=sender, body=body, subject=subject,
|
||||
in_reply_to=header_message_id, event=target_event, issue_thread=active_issue_thread)
|
||||
reply = make_reply(reply_email, references)
|
||||
reply = make_reply(reply_email, references, event=target_event.slug if target_event else None)
|
||||
else:
|
||||
# change state if not new
|
||||
if active_issue_thread.state != 'pending_new':
|
||||
|
|
Loading…
Reference in a new issue