# HG changeset patch # User Marcin Kuzminski # Date 2013-03-04 12:12:38 # Node ID cf665eb84d4c5be192a24e59ba2de5896af4fd62 # Parent e74557f57f76056b770776fa24edf3666e7a507c notification model should only send html emails not generating multipart ones diff --git a/rhodecode/lib/celerylib/tasks.py b/rhodecode/lib/celerylib/tasks.py --- a/rhodecode/lib/celerylib/tasks.py +++ b/rhodecode/lib/celerylib/tasks.py @@ -254,7 +254,7 @@ def get_commits_stats(repo_name, ts_min_ @task(ignore_result=True) @dbsession -def send_email(recipients, subject, body, html_body=''): +def send_email(recipients, subject, body='', html_body=''): """ Sends an email with defined parameters from the .ini files. @@ -282,7 +282,7 @@ def send_email(recipients, subject, body mail_port = email_config.get('smtp_port') tls = str2bool(email_config.get('smtp_use_tls')) ssl = str2bool(email_config.get('smtp_use_ssl')) - debug = str2bool(config.get('debug')) + debug = str2bool(email_config.get('debug')) smtp_auth = email_config.get('smtp_auth') if not mail_server: diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -109,9 +109,10 @@ class NotificationModel(BaseModel): # send email with notification to all other participants for rec in rec_objs: if not email_subject: - email_subject = NotificationModel().make_description(notif, show_age=False) + email_subject = NotificationModel()\ + .make_description(notif, show_age=False) type_ = type_ - email_body = body + email_body = None # we set body to none, we just send HTML emails ## this is passed into template kwargs = {'subject': subject, 'body': h.rst_w_mentions(body)} kwargs.update(email_kwargs)