在Google App Engine上发送邮件哪个更好?
这个链接是关于开发服务器的文档:http://code.google.com/intl/en/appengine/docs/python/tools/devserver.html
The web server can use an SMTP server, or it can use a local installation of Sendmail.
我下载了Sendmail库,发现它非常大,还有很多文档。
我想知道哪种方式更好。
如果Sendmail的方式更好,那我该怎么简单地使用它呢?
谢谢!
更新:
如果无法设置Sendmail库,就不能使用这个方法(mail.send_mail),对吗?
from google.appengine.api import mail
mail.send_mail(sender="support@example.com",
to="Albert Johnson <Albert.Johnson@example.com>",
subject="Your account has been approved",
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
""")
1 个回答
2
正如Wooble所说,这个只适用于在开发环境中发送邮件,所以你可以选择最简单的选项。如果你尝试的选项都不行,在开发服务器上发送的邮件仍然会出现在你的日志里,这样你就可以在那里进行调试。