diff --git a/app/dashboard/templates/dashboard/alias_log.html b/app/dashboard/templates/dashboard/alias_log.html index 938877e0..d6b3c71b 100644 --- a/app/dashboard/templates/dashboard/alias_log.html +++ b/app/dashboard/templates/dashboard/alias_log.html @@ -19,7 +19,7 @@
{{ log.when | dt }}
- {{ log.website_email }} + {{ log.website_from or log.website_email }} {% if log.is_reply %} diff --git a/app/dashboard/views/alias_log.py b/app/dashboard/views/alias_log.py index d1eb6eb4..31089056 100644 --- a/app/dashboard/views/alias_log.py +++ b/app/dashboard/views/alias_log.py @@ -12,6 +12,7 @@ from app.models import GenEmail, ForwardEmailLog, ForwardEmail @dataclass class AliasLog: website_email: str + website_from: str alias: str when: arrow.Arrow is_reply: bool @@ -50,6 +51,7 @@ def get_alias_log(gen_email: GenEmail): for fe, fel in q: al = AliasLog( website_email=fe.website_email, + website_from=fe.website_from, alias=gen_email.email, when=fel.created_at, is_reply=fel.is_reply, diff --git a/email_handler.py b/email_handler.py index ae7cda0f..9e65eff8 100644 --- a/email_handler.py +++ b/email_handler.py @@ -104,6 +104,7 @@ class MailHandler: forward_email = ForwardEmail.create( gen_email_id=gen_email.id, website_email=website_email, + website_from=msg["From"], reply_email=reply_email, ) db.session.commit()