本人设置过程:邮件发送方:网易163 邮件接收方:qq邮箱
第一步:
开通网易163的smtp服务功能(百度so easy),并且获取授权码。
第二步:
设置airflow里的airflow.cfg配置文件如下例子:
[email]
email_backend = airflow.utils.email.send_email_smtp
[smtp]
# If you want airflow to send emails on retries, failure, and you want to use
# the airflow.utils.email.send_email_smtp function, you have to configure an
# smtp server here
smtp_host = smtp.163.com
smtp_starttls = True
smtp_ssl = False
# Uncomment and set the user/pass settings if you want to use SMTP AUTH
smtp_user = user@163.com
smtp_password = password # 163邮箱配置的授权码
smtp_port = 25
smtp_mail_from = user@163.com
第三步:
编写作业