diff options
Diffstat (limited to 'src/jwebmail/render_mail.py')
-rw-r--r-- | src/jwebmail/render_mail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index 7dc0824..f76c40a 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -66,7 +66,7 @@ def render_multipart(_subtype, content, path): for i, p in enumerate(parts): R += "<div class=media><div class=media-content>\n" if ( - not p["head"]["content_disposition"] + not p["head"].get("content_disposition") or p["head"]["content_disposition"].lower() == "none" or p["head"]["content_disposition"].lower() == "inline" ): @@ -107,7 +107,7 @@ def _format_header(category, value): for v in value: value = ( f'"{v["display_name"]}" <{v["address"]}>' - if v["display_name"] + if v.get("display_name") else v["address"] ) R += f"<dd>{escape(value)}<dd>\n" |