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 @@ +
+ This might mean {{ contact.email }} + +
+ + + View the bounced email + + +
+ The email is automatically deleted in 7 days. +
+ +
+ Please consider the following options:
+ +
    +
  1. If the email is not spam, you can create a + filter + to explicitly allow all emails from SimpleLogin.
    +
  2. + +
  3. + If this email is indeed spam, it means your alias {{ alias.email }} is now in the hands of a spammer. + You can either disable the alias + or block the sender if they send too many spams. +
  4. +
+ + +
+ + + +