notify admin if someone uses reply phase
This commit is contained in:
parent
a01c94187f
commit
b80dbdf60b
|
@ -38,6 +38,7 @@ from smtplib import SMTP
|
|||
from aiosmtpd.controller import Controller
|
||||
|
||||
from app.config import EMAIL_DOMAIN
|
||||
from app.email_utils import notify_admin
|
||||
from app.extensions import db
|
||||
from app.log import LOG
|
||||
from app.models import GenEmail, ForwardEmail
|
||||
|
@ -141,6 +142,10 @@ class MailHandler:
|
|||
|
||||
alias = forward_email.gen_email.email
|
||||
|
||||
notify_admin(
|
||||
f"Reply phase used by user: {forward_email.gen_email.user.email} "
|
||||
)
|
||||
|
||||
# email seems to come from alias
|
||||
msg.replace_header("From", alias)
|
||||
msg.replace_header("To", forward_email.website_email)
|
||||
|
|
Loading…
Reference in New Issue