From b29c28f865f5ebd71298089d747b917530c3c217 Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Tue, 4 Dec 2012 17:06:02 +0100 Subject: [PATCH] [#1635] Fix handling of smtp.starttls option --- ckan/lib/mailer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ckan/lib/mailer.py b/ckan/lib/mailer.py index 6979e8230b4..5cbba7f5fa4 100644 --- a/ckan/lib/mailer.py +++ b/ckan/lib/mailer.py @@ -11,6 +11,7 @@ from pylons import config from ckan import model, __version__ from ckan.lib.helpers import url_for +import paste.deploy.converters log = logging.getLogger(__name__) @@ -48,7 +49,8 @@ def _mail_recipient(recipient_name, recipient_email, smtp_password = None else: smtp_server = config.get('smtp.server', 'localhost') - smtp_starttls = config.get('smtp.starttls') + smtp_starttls = paste.deploy.converters.asbool( + config.get('smtp.starttls')) smtp_user = config.get('smtp.user') smtp_password = config.get('smtp.password') smtp_connection.connect(smtp_server)