mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 07:43:54 +08:00
fix orig email not correctly uploaded in handle_bounce_forward_phase()
This commit is contained in:
parent
a044c47295
commit
8764a050d5
1 changed files with 6 additions and 2 deletions
|
@ -1281,7 +1281,9 @@ def handle_bounce_forward_phase(msg: Message, email_log: EmailLog):
|
||||||
random_name = str(uuid.uuid4())
|
random_name = str(uuid.uuid4())
|
||||||
|
|
||||||
full_report_path = f"refused-emails/full-{random_name}.eml"
|
full_report_path = f"refused-emails/full-{random_name}.eml"
|
||||||
s3.upload_email_from_bytesio(full_report_path, BytesIO(to_bytes(msg)), random_name)
|
s3.upload_email_from_bytesio(
|
||||||
|
full_report_path, BytesIO(to_bytes(msg)), f"full-{random_name}"
|
||||||
|
)
|
||||||
|
|
||||||
file_path = None
|
file_path = None
|
||||||
|
|
||||||
|
@ -1298,7 +1300,9 @@ def handle_bounce_forward_phase(msg: Message, email_log: EmailLog):
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
file_path = f"refused-emails/{random_name}.eml"
|
file_path = f"refused-emails/{random_name}.eml"
|
||||||
s3.upload_email_from_bytesio(file_path, BytesIO(to_bytes(msg)), random_name)
|
s3.upload_email_from_bytesio(
|
||||||
|
file_path, BytesIO(to_bytes(orig_msg)), random_name
|
||||||
|
)
|
||||||
|
|
||||||
refused_email = RefusedEmail.create(
|
refused_email = RefusedEmail.create(
|
||||||
path=file_path, full_report_path=full_report_path, user_id=user.id
|
path=file_path, full_report_path=full_report_path, user_id=user.id
|
||||||
|
|
Loading…
Reference in a new issue