{# The connection fields of an IMAP or POP3 account, with sending over SMTP, or of a JMAP account, filled in from ``values``. ``protocol``: "imap", "pop3" or "jmap", None where the form lets one choose between IMAP and POP3. ``editing``: the account exists, an emptied field removes that setting. #} {% macro connection_fields(values, security, editing=False, suffix="", protocol="imap") %} {% set ids = "-" ~ suffix if suffix else "" %} {% if protocol == "jmap" %}{{ jmap_fields(values, editing, ids) }}{% else %} {% set ports = {"imap": "993 for tls, 143 for starttls", "pop3": "995 for tls, 110 for starttls"} %} {% set protocol = protocol if not protocol or protocol in ports else "imap" %} {% set incoming = protocol | upper if protocol else "Incoming" %}
Only what you change is sent. A change of server logs in again first.
{% endif %} {% endif %} {% endmacro %} {# A JMAP server: where its session is, and how the account signs in. #} {% macro jmap_fields(values, editing, ids) %}Only what you change is sent. A change of server logs in again first.
{% endif %} {% endmacro %}