{% if email.smtp is defined or email.smtp != None %}
EMAIL_SEND_PROTOCOL=smtp
EMAIL_SMTP_HOST={{ email.smtp.host }}
EMAIL_SMTP_PORT={{ email.smtp.port }}
EMAIL_SMTP_SECURE={{ email.smtp.conn_mode }}
EMAIL_SMTP_USERNAME={{ email.smtp.username }}
EMAIL_SMTP_AUTHTYPE={{ email.smtp.auth_meth.upper() }}
EMAIL_SMTP_USER_ALIAS={{ (email.smtp.alias | split("@"))[0] }}
EMAIL_SMTP_EMAIL_ALIAS={{ (email.smtp.alias | split("@"))[1] }}
{% endif %}