mirror of
https://github.com/simple-login/app.git
synced 2025-11-19 00:28:41 +08:00
send transactional email from SENDER if set
This commit is contained in:
parent
9abfa3e98c
commit
d0c65ea378
1 changed files with 5 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ from app.config import (
|
|||
DISPOSABLE_EMAIL_DOMAINS,
|
||||
MAX_ALERT_24H,
|
||||
POSTFIX_PORT,
|
||||
SENDER,
|
||||
)
|
||||
from app.dns_utils import get_mx_domains
|
||||
from app.extensions import db
|
||||
|
|
@ -220,7 +221,10 @@ def send_email(to_email, subject, plaintext, html=None):
|
|||
add_dkim_signature(msg, email_domain)
|
||||
|
||||
msg_raw = msg.as_bytes()
|
||||
smtp.sendmail(SUPPORT_EMAIL, to_email, msg_raw)
|
||||
if SENDER:
|
||||
smtp.sendmail(SENDER, to_email, msg_raw)
|
||||
else:
|
||||
smtp.sendmail(SUPPORT_EMAIL, to_email, msg_raw)
|
||||
|
||||
|
||||
def send_email_with_rate_control(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue