Changeset - 99d32d5d70db
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-01-02 13:56:34
madski@unity3d.com
email: fail nicely when no SMTP server has been configured
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -347,6 +347,10 @@ def send_email(recipients, subject, body
 
    debug = str2bool(config.get('debug'))
 
    smtp_auth = email_config.get('smtp_auth')
 

	
 
    if not mail_server:
 
        log.error("SMTP mail server not configured - cannot send mail")
 
        return False
 

	
 
    try:
 
        m = SmtpMailer(mail_from, user, passwd, mail_server, smtp_auth,
 
                       mail_port, ssl, tls, debug=debug)
0 comments (0 inline, 0 general)