mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
handle case where email_log is deleted
This commit is contained in:
parent
81840e5ba5
commit
fcc04ba929
1 changed files with 3 additions and 0 deletions
|
@ -1596,6 +1596,9 @@ def handle_bounce(envelope, rcpt_to) -> str:
|
|||
email_log_id = parse_email_log_id_from_bounce(rcpt_to)
|
||||
email_log = EmailLog.get(email_log_id)
|
||||
|
||||
if not email_log:
|
||||
return "550 SL E27 No such email log"
|
||||
|
||||
if email_log.is_reply:
|
||||
handle_bounce_reply_phase(msg, email_log)
|
||||
return "550 SL E24 Email cannot be sent to contact"
|
||||
|
|
Loading…
Reference in a new issue