improve bounce email notification
This commit is contained in:
parent
a4dbbb6ac2
commit
5f6ad21e85
|
@ -1297,16 +1297,18 @@ def handle_bounce_forward_phase(msg: Message, email_log: EmailLog):
|
||||||
alias,
|
alias,
|
||||||
)
|
)
|
||||||
disable_alias_link = f"{URL}/dashboard/unsubscribe/{alias.id}"
|
disable_alias_link = f"{URL}/dashboard/unsubscribe/{alias.id}"
|
||||||
|
block_sender_link = f"{URL}/dashboard/alias_contact_manager/{alias.id}?highlight_contact_id={contact.id}"
|
||||||
send_email_with_rate_control(
|
send_email_with_rate_control(
|
||||||
user,
|
user,
|
||||||
ALERT_BOUNCE_EMAIL,
|
ALERT_BOUNCE_EMAIL,
|
||||||
user.email,
|
user.email,
|
||||||
f"Email from {contact.website_email} to {alias.email} cannot be delivered to your mailbox",
|
f"Email from {contact.website_email} to {alias.email} cannot be delivered to your mailbox",
|
||||||
render(
|
render(
|
||||||
"transactional/bounce/bounced-email.txt",
|
"transactional/bounce/bounced-email.txt.jinja2",
|
||||||
alias=alias,
|
alias=alias,
|
||||||
website_email=contact.website_email,
|
website_email=contact.website_email,
|
||||||
disable_alias_link=disable_alias_link,
|
disable_alias_link=disable_alias_link,
|
||||||
|
block_sender_link=block_sender_link,
|
||||||
refused_email_url=refused_email_url,
|
refused_email_url=refused_email_url,
|
||||||
mailbox_email=mailbox.email,
|
mailbox_email=mailbox.email,
|
||||||
),
|
),
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{% call text() %}
|
{% call text() %}
|
||||||
This is usually because your mailbox service thinks the email is a <b>spam</b>.
|
This is usually because your mailbox service thinks the email is <b>spam</b>.
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{{ render_button("View the bounced email", refused_email_url) }}
|
{{ render_button("View the bounced email", refused_email_url) }}
|
||||||
|
@ -20,21 +20,21 @@
|
||||||
Please consider the following options: <br>
|
Please consider the following options: <br>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li>If the email is not spam at all, you can create a <b>filter</b> to explicitly allow this email
|
<li>If the email is not spam, you can create a
|
||||||
or simply all emails from SimpleLogin. <br>
|
<a href="https://simplelogin.io/docs/getting-started/troubleshooting/">filter</a>
|
||||||
How to create the filter depends on your mailbox service.
|
to explicitly allow all emails from SimpleLogin. <br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
If this email is indeed a spam, it means your alias {{alias.email}} is now in the hands of a spammer. <br>
|
If this email is indeed spam, it means your alias {{ alias.email }} is now in the hands of a spammer.
|
||||||
You should <b>disable</b> the alias immediately. <br>
|
You can either <a href="{{ disable_alias_link }}">disable the alias</a>
|
||||||
We'll <b>automatically</b> disable this alias when too many emails sent to it are bounced.
|
or <a href="{{ block_sender_link }}">block the sender</a> if they send too many spams.
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
Please note that the alias can be automatically disabled if too many emails sent to it are bounced.
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|
||||||
{{ render_button("Disable alias", disable_alias_link) }}
|
|
||||||
|
|
||||||
{{ render_text('Thanks, <br />SimpleLogin Team.') }}
|
{{ render_text('Thanks, <br />SimpleLogin Team.') }}
|
||||||
{{ raw_url(disable_alias_link) }}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,15 +7,14 @@ The email is automatically deleted in 7 days.
|
||||||
|
|
||||||
Please consider the following options:
|
Please consider the following options:
|
||||||
|
|
||||||
1. If the email is not spam at all, you can create a "filter" to explicitly allow this email
|
1. If the email is not spam at all, you can create a "filter" to explicitly allow all emails from SimpleLogin.
|
||||||
or simply all emails from SimpleLogin.
|
We have a small gudie on https://simplelogin.io/docs/getting-started/troubleshooting/
|
||||||
How to create the filter depends on your mailbox service.
|
|
||||||
|
|
||||||
2. If this email is spam, it means your alias {{alias}} is now in the hands of a spammer.
|
2. If this email is spam, it means your alias {{alias}} is now in the hands of a spammer.
|
||||||
You should disable or delete the alias immediately.
|
You can either disable the alias on {{disable_alias_link}}
|
||||||
We'll automatically disable this alias the second time the email is refused.
|
or block the sender on {{ block_sender_link }} if they send too many spams.
|
||||||
|
|
||||||
{{disable_alias_link}}
|
Please note that the alias can be automatically disabled if too many emails sent to it are bounced.
|
||||||
|
|
||||||
Thanks,
|
Thanks,
|
||||||
SimpleLogin team.
|
SimpleLogin team.
|
Loading…
Reference in New Issue