我正在使用 mail.send_mail()
将电子邮件从一个地址发送到另一个地址。
当我在本地主机上运行我的应用程序时,我在我的日志中查看,它说:
You are not currently sending out real email. If you have sendmail installed you can use it by using the server with --enable_sendmail
那么,这是否意味着我必须为我的服务器启用发送邮件功能。如果那是真的,如何启用?
谢谢:)
最佳答案
Windows 通常不安装 sendmail。您最好使用 --smtp_host 和 --smtp_port 选项来配置您的开发服务器。请注意,这些选项仅在开发中是必需的 - 一旦上传,发送邮件就会自动运行。
更多信息请访问: https://developers.google.com/appengine/docs/python/tools/devserver#Using_Mail
如果您的 ISP 或您的雇主没有提供给您的 SMTP 服务器,您可以使用 gmail。设置列于: http://support.google.com/mail/bin/answer.py?hl=en&answer=13287
要向 App Engine 启动器添加标志,只需双击您的实例并使用 Extra Flags
字段。
关于python - 应用引擎,Python : Send Mail function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11343462/