Changeset - cf665eb84d4c
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2013-03-04 12:12:38
marcin@python-works.com
notification model should only send html emails not generating multipart ones
2 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -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:
rhodecode/model/notification.py
Show inline comments
 
@@ -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)
0 comments (0 inline, 0 general)