diff --git a/core/mail/protocol.py b/core/mail/protocol.py index cb4cf0a..d7dbaf9 100644 --- a/core/mail/protocol.py +++ b/core/mail/protocol.py @@ -131,6 +131,8 @@ class LMTPHandler: ) log.info(f"Sent message to frontend") + references = await sync_to_async(collect_references)(active_issue_thread) + reply_email = await sync_to_async(Email.objects.create)(sender=recipient, # "noreply@" + MAIL_DOMAIN, recipient=sender, body="Thank you for your message.", @@ -138,8 +140,6 @@ class LMTPHandler: in_reply_to=header_message_id, event=target_event, issue_thread=active_issue_thread) - - references = await sync_to_async(collect_references)(active_issue_thread) await send_smtp(make_reply(reply_email, references), log) log.info("Sent reply")