diff --git a/email_handler.py b/email_handler.py index d41e73c6..61f503f3 100644 --- a/email_handler.py +++ b/email_handler.py @@ -1710,6 +1710,17 @@ def handle_bounce_reply_phase(envelope, msg: Message, email_log: EmailLog): alias, contact, ) + Notification.create( + user_id=user.id, + title=f"Email cannot be sent to { contact.email } from your alias { alias.email }", + message=Notification.render( + "notification/bounce-reply-phase.html", + alias=alias, + contact=contact, + refused_email_url=refused_email.get_url(), + ), + commit=True, + ) send_email_with_rate_control( user, ALERT_BOUNCE_EMAIL_REPLY_PHASE, diff --git a/templates/notification/bounce-reply-phase.html b/templates/notification/bounce-reply-phase.html new file mode 100644 index 00000000..39a8dd18 --- /dev/null +++ b/templates/notification/bounce-reply-phase.html @@ -0,0 +1,39 @@ +