【发布时间】:2020-04-13 18:13:28
【问题描述】:
我想通过一个针对一个电子邮件地址的smtp 服务器从多个电子邮件地址(如test@test1.com、sample@sample2.com)发送电子邮件。但是当我这样做时,会出现以下错误:
raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials
我的 SMTP 设置是:
export CR_AUTH_MAIL_SERVER=smtp.gmail.com
export CR_AUTH_MAIL_PORT=587
export CR_AUTH_MAIL_USERNAME=testing@stackoverflowQuestion.com
export CR_AUTH_MAIL_PASSWORD=sampleForQuestion
如果我使用testing@stackoverflowQuestion.com 以外的电子邮件地址,则会出现错误。
我可以使用一个电子邮件地址从多个有效电子邮件地址发送电子邮件吗?我总是收到来自testing@stackoverflowQuestion.com 的电子邮件。
【问题讨论】:
标签: python email web-applications smtp google-email-settings-api