##// END OF EJS Templates
notification model should only send html emails not generating multipart ones
marcink -
r3448:cf665eb8 beta
parent child Browse files
Show More
@@ -254,7 +254,7 b' def get_commits_stats(repo_name, ts_min_'
254
254
255 @task(ignore_result=True)
255 @task(ignore_result=True)
256 @dbsession
256 @dbsession
257 def send_email(recipients, subject, body, html_body=''):
257 def send_email(recipients, subject, body='', html_body=''):
258 """
258 """
259 Sends an email with defined parameters from the .ini files.
259 Sends an email with defined parameters from the .ini files.
260
260
@@ -282,7 +282,7 b' def send_email(recipients, subject, body'
282 mail_port = email_config.get('smtp_port')
282 mail_port = email_config.get('smtp_port')
283 tls = str2bool(email_config.get('smtp_use_tls'))
283 tls = str2bool(email_config.get('smtp_use_tls'))
284 ssl = str2bool(email_config.get('smtp_use_ssl'))
284 ssl = str2bool(email_config.get('smtp_use_ssl'))
285 debug = str2bool(config.get('debug'))
285 debug = str2bool(email_config.get('debug'))
286 smtp_auth = email_config.get('smtp_auth')
286 smtp_auth = email_config.get('smtp_auth')
287
287
288 if not mail_server:
288 if not mail_server:
@@ -109,9 +109,10 b' class NotificationModel(BaseModel):'
109 # send email with notification to all other participants
109 # send email with notification to all other participants
110 for rec in rec_objs:
110 for rec in rec_objs:
111 if not email_subject:
111 if not email_subject:
112 email_subject = NotificationModel().make_description(notif, show_age=False)
112 email_subject = NotificationModel()\
113 .make_description(notif, show_age=False)
113 type_ = type_
114 type_ = type_
114 email_body = body
115 email_body = None # we set body to none, we just send HTML emails
115 ## this is passed into template
116 ## this is passed into template
116 kwargs = {'subject': subject, 'body': h.rst_w_mentions(body)}
117 kwargs = {'subject': subject, 'body': h.rst_w_mentions(body)}
117 kwargs.update(email_kwargs)
118 kwargs.update(email_kwargs)
General Comments 0
You need to be logged in to leave comments. Login now