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 @@ -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)