disable bounced email in alias log
This commit is contained in:
parent
0e7a77130c
commit
74d1f87db0
|
@ -146,7 +146,9 @@ def get_alias_activities(alias_id):
|
||||||
activity["to"] = alias_log.alias
|
activity["to"] = alias_log.alias
|
||||||
activity["from"] = alias_log.website_from or alias_log.website_email
|
activity["from"] = alias_log.website_from or alias_log.website_email
|
||||||
|
|
||||||
if alias_log.blocked:
|
if alias_log.bounced:
|
||||||
|
activity["action"] = "bounced"
|
||||||
|
elif alias_log.blocked:
|
||||||
activity["action"] = "block"
|
activity["action"] = "block"
|
||||||
else:
|
else:
|
||||||
activity["action"] = "forward"
|
activity["action"] = "forward"
|
||||||
|
|
|
@ -117,6 +117,8 @@
|
||||||
<img src="{{ url_for('static', filename='arrows/reply-arrow.svg') }}" class="arrow">
|
<img src="{{ url_for('static', filename='arrows/reply-arrow.svg') }}" class="arrow">
|
||||||
{% elif log.blocked %}
|
{% elif log.blocked %}
|
||||||
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}" class="arrow">
|
<img src="{{ url_for('static', filename='arrows/blocked-arrow.svg') }}" class="arrow">
|
||||||
|
{% elif log.bounced %}
|
||||||
|
<span class="text-danger"> --- Refused (or bounced) ---> </span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}" class="arrow">
|
<img src="{{ url_for('static', filename='arrows/forward-arrow.svg') }}" class="arrow">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -15,6 +15,7 @@ class AliasLog:
|
||||||
when: arrow.Arrow
|
when: arrow.Arrow
|
||||||
is_reply: bool
|
is_reply: bool
|
||||||
blocked: bool
|
blocked: bool
|
||||||
|
bounced: bool
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
for k, v in kwargs.items():
|
for k, v in kwargs.items():
|
||||||
|
@ -79,6 +80,7 @@ def get_alias_log(gen_email: GenEmail, page_id=0):
|
||||||
when=fel.created_at,
|
when=fel.created_at,
|
||||||
is_reply=fel.is_reply,
|
is_reply=fel.is_reply,
|
||||||
blocked=fel.blocked,
|
blocked=fel.blocked,
|
||||||
|
bounced=fel.bounced,
|
||||||
)
|
)
|
||||||
logs.append(al)
|
logs.append(al)
|
||||||
logs = sorted(logs, key=lambda l: l.when, reverse=True)
|
logs = sorted(logs, key=lambda l: l.when, reverse=True)
|
||||||
|
|
Loading…
Reference in New Issue