changeset 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 d1615f79dfe8
children 085f29c20f7e
files src/plugins/plugin_misc_account.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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)