{%- set mid = mid or 'ephemeral-new' %} {%- set editing_strings = editing_strings or {'to_aids': [], 'cc_aids': [], 'bcc_aids': []} %} {%- set editing_addresses = [] %} {%- set profiles = profiles or mailpile('profiles').result %}
{{ csrf_field|safe }} {% if '-' not in mid %}
{% endif %}
{%- for field, name in (('to', _("To")), ('cc', _("Cc")), ('bcc', _("Bcc"))) %}

{{name}}:

{%- endfor %}
{# FIXME: List tags, add ability to add tags while composing #}

{{_("Subject")}}:

    {% if editing_strings.attachments %} {% for att in attachments %}
  • {% if att.mimetype in ["image/bmp", "image/gif", "image/jpg", "image/jpeg", "image/pjpeg", "image/svg+xml", "image/x-png", "image/png", "application/vnd.google-apps.photo"] %} {% else %}
    {% set file_parts = att.filename.split(".") %} {% set file_parts_length = file_parts|length %} {{ file_parts[file_parts_length - 1] }}
    {% if file_parts_length > 2 or att.filename|length > 20 %} {{ att.filename[0:16] }}... {% else %} {{ file_parts[0] }} {% endif %}
    {% endif %}
  • {% endfor %} {% endif %}
{% if '-' not in mid %} {% endif %}