diff --git a/ckan/lib/mailer.py b/ckan/lib/mailer.py index d40a0d5b5e9..22d178858ec 100644 --- a/ckan/lib/mailer.py +++ b/ckan/lib/mailer.py @@ -28,7 +28,11 @@ class MailerException(Exception): def _mail_recipient(recipient_name, recipient_email, sender_name, sender_url, subject, - body, headers={}): + body, headers=None): + + if not headers: + headers = {} + mail_from = config.get('smtp.mail_from') msg = MIMEText(body.encode('utf-8'), 'plain', 'utf-8') for k, v in headers.items():