我想用smtplib在python 2.7中发送邮件。下面的代码很简单:smtplib.SMTPAuthenticationError:(535,'5.7.3身份验证不成功')
import smtplib
def main(argv=None):
sender = '[email protected]'
receivers = ['[email protected]']
message = """
This is a test e-mail message.
"""
smtpObj = smtplib.SMTP('[email protected]',25)
smtpObj.login('abc', 'pwd')
smtpObj.sendmail(sender, receivers, message)
print "Successfully sent email"
if __name__ == '__main__':
main()
现在,当我执行下面的代码,我不断收到此异常:
smtplib.SMTPAuthenticationError:(535, '5.7.3身份验证不成功')。
请注意。
谢谢,
同样的事情,我也忘了 –