plugin misc account: fixed handling of None/empty values in sendEmails.sendEmail

This commit is contained in:
Goffi 2016-03-09 12:54:26 +01:00
commit edeaa0f9bc

View file

@ -284,10 +284,10 @@ class MiscAccount(object):
email_from.encode("utf-8"),
[email.encode("utf-8") for email in recipients],
msg.as_string(),
senderDomainName=email_sender_domain.encode("utf-8"),
senderDomainName=email_sender_domain.encode("utf-8") if email_sender_domain else None,
port=email_port,
username=email_username.encode("utf-8"),
password=email_password.encode("utf-8"),
username=email_username.encode("utf-8") if email_username else None,
password=email_password.encode("utf-8") if email_password else None,
requireAuthentication=email_starttls,
requireTransportSecurity=email_auth)