【发布时间】:2016-12-04 21:43:39
【问题描述】:
我正在尝试从我的应用程序发送电子邮件。代码成功运行,没有错误。但它不发送电子邮件。它在控制台上显示此消息。
You are not currently sending out real email.
If you have sendmail installed you can use it by using the
server with --enable_sendmail
google提供的示例代码为:
message = mail.EmailMessage(
sender="shaizi9687@gmail.com",
subject="Your account has been approved")
message.to = "ABC <shahzebakram@hotmail.com>"
message.body = """Dear Albert:
Your example.com account has been approved. You can now visit
http://www.example.com/ and sign in using your Google Account to
access new features.
Please let us know if you have any questions.
The example.com Team
"""
message.send()
【问题讨论】:
标签: python email google-app-engine webapp2