I just addressed this issue in UPDATING.md under 1.7.1.2 https://github.com/apache/incubator-airflow/blob/master/UPDATING.md
On Tue, Jun 14, 2016 at 5:56 PM, Jason Chen <[email protected]> wrote: > Hi > > I am using airflow v1.7.1.3 and it seems email is not working and I got > the following error message. > Any suggestions ? > Thanks. > > Jason Chen > > > (1) Error message > > [2016-06-15 00:21:15,506] {models.py:1304} INFO - All retries failed; > marking task as FAILED > [2016-06-15 00:21:15,509] {models.py:1311} ERROR - Failed to send > email to: ['[email protected]'] > [2016-06-15 00:21:15,509] {models.py:1312} ERROR - 'module' object has > no attribute 'send_email_smtp' > Traceback (most recent call last): > File "/usr/local/lib/python2.7/site-packages/airflow/models.py", > line 1308, in handle_failure > self.email_alert(error, is_retry=False) > File "/usr/local/lib/python2.7/site-packages/airflow/models.py", > line 1425, in email_alert > send_email(task.email, title, body) > File "/usr/local/lib/python2.7/site-packages/airflow/utils/email.py", > line 42, in send_email > backend = getattr(module, attr) > AttributeError: 'module' object has no attribute 'send_email_smtp' > [2016-06-15 00:21:15,547] {models.py:1327} ERROR - Command failed from > spark_task ..... > > (2) Email setting in airflow.cfg > > [email] > email_backend = airflow.utils.send_email_smtp > > [smtp] > # If you want airflow to send emails on retries, failure, and you want to > # the airflow.utils.send_email function, you have to configure an smtp > # server here > smtp_host = localhost > smtp_starttls = False > smtp_ssl = False > smtp_user = > smtp_port = 25 > smtp_password = > smtp_mail_from = [email protected] > > (3) Note: I was using airflow v1.7.0 before and the email worked fine and > not working for v1.7.1.3 >
