mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 15:05:59 +08:00
send warning about email cycle at most once
This commit is contained in:
parent
37a53757eb
commit
4a90ea9aca
|
@ -91,6 +91,7 @@ from app.email_utils import (
|
|||
copy,
|
||||
to_bytes,
|
||||
get_header_from_bounce,
|
||||
send_email_at_most_times,
|
||||
)
|
||||
from app.extensions import db
|
||||
from app.greylisting import greylisting_needed
|
||||
|
@ -395,7 +396,7 @@ def handle_email_sent_to_ourself(alias, mailbox, msg: Message, user):
|
|||
# link available for 6 days as it gets deleted in 7 days
|
||||
refused_email_url = refused_email.get_url(expires_in=518400)
|
||||
|
||||
send_email_with_rate_control(
|
||||
send_email_at_most_times(
|
||||
user,
|
||||
ALERT_SEND_EMAIL_CYCLE,
|
||||
mailbox.email,
|
||||
|
@ -414,7 +415,6 @@ def handle_email_sent_to_ourself(alias, mailbox, msg: Message, user):
|
|||
mailbox=mailbox,
|
||||
refused_email_url=refused_email_url,
|
||||
),
|
||||
max_alert_24h=1,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue