remove bounced_email param from send_email_with_rate_control

This commit is contained in:
Son NK 2020-06-10 12:17:04 +02:00
parent da7b46ef97
commit 0c4e48c906
2 changed files with 0 additions and 7 deletions

View file

@ -228,7 +228,6 @@ def send_email_with_rate_control(
subject,
plaintext,
html=None,
bounced_email: Optional[Message] = None,
max_alert_24h=MAX_ALERT_24H,
) -> bool:
"""Same as send_email with rate control over alert_type.

View file

@ -836,7 +836,6 @@ def handle_bounce(contact: Contact, alias: Alias, msg: Message, user: User):
send_email_with_rate_control(
user,
ALERT_BOUNCE_EMAIL,
# use user mail here as only user is authenticated to see the refused email
user.email,
f"Email from {contact.website_email} to {address} cannot be delivered to your inbox",
render(
@ -857,8 +856,6 @@ def handle_bounce(contact: Contact, alias: Alias, msg: Message, user: User):
refused_email_url=refused_email_url,
mailbox_email=mailbox.email,
),
# cannot include bounce email as it can contain spammy text
# bounced_email=msg,
)
# disable the alias the second time email is bounced
elif nb_bounced >= 2:
@ -876,7 +873,6 @@ def handle_bounce(contact: Contact, alias: Alias, msg: Message, user: User):
send_email_with_rate_control(
user,
ALERT_BOUNCE_EMAIL,
# use user mail here as only user is authenticated to see the refused email
user.email,
f"Alias {address} has been disabled due to second undelivered email from {contact.website_email}",
render(
@ -895,8 +891,6 @@ def handle_bounce(contact: Contact, alias: Alias, msg: Message, user: User):
refused_email_url=refused_email_url,
mailbox_email=mailbox.email,
),
# cannot include bounce email as it can contain spammy text
# bounced_email=msg,
)