Mercurial > libervia-backend
diff src/plugins/plugin_misc_account.py @ 1901:faa8427dd032
plugin misc account: fixed handling of None/empty values in sendEmails.sendEmail
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Mar 2016 12:54:26 +0100 |
parents | 31b8a58cfcf5 |
children | 0b748ad46ede |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_account.py Wed Mar 09 12:11:35 2016 +0100 +++ b/src/plugins/plugin_misc_account.py Wed Mar 09 12:54:26 2016 +0100 @@ -284,10 +284,10 @@ 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)