diff options
Diffstat (limited to 'src/jwebmail/render_mail.py')
-rw-r--r-- | src/jwebmail/render_mail.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index 804b200..588959c 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -114,10 +114,10 @@ def render_message(subtype, msg, path): R += '<dl class="jwm-mail-header">' R += f"<dt>{escape(gettext('Subject'))}</dt>" R += f"<dd>{escape(msg['head']['subject'])}</dd>\n" - R += _format_header(gettext("From"), msg["head"]["from"]) - R += _format_header(gettext("To"), msg["head"]["to"]) - R += _format_header(gettext("CC"), msg["head"]["cc"]) - R += _format_header(gettext("BCC"), msg["head"]["bcc"]) + R += _format_header(gettext("From"), msg["head"].get("from")) + R += _format_header(gettext("To"), msg["head"].get("to")) + R += _format_header(gettext("CC"), msg["head"].get("cc")) + R += _format_header(gettext("BCC"), msg["head"].get("bcc")) R += f"<dt>{escape(gettext('Date'))}</dt>" R += f"<dd>{escape(msg['head']['date'])}</dd>\n" R += f"<dt>{escape(gettext('Content-Type'))}</dt>" |