save raw_mails as file

This commit is contained in:
j3d1 2024-11-08 22:23:52 +01:00
parent 0c4995db2b
commit 4272aab643
4 changed files with 40 additions and 2 deletions

View file

@ -206,7 +206,7 @@ def receive_email(envelope, log=None):
email = Email.objects.create(
sender=sender, recipient=recipient, body=body, subject=subject, reference=header_message_id,
in_reply_to=header_in_reply_to, raw=envelope.content, event=target_event,
in_reply_to=header_in_reply_to, raw_file=ContentFile(envelope.content), event=target_event,
issue_thread=active_issue_thread)
for attachment in attachments:
email.attachments.add(attachment)