Google App Engine(Python) - 邮件已发送但未收到 [英] Google App Engine (Python) - Mail sent but not received
问题描述
下面是我用来发送邮件的代码(不完全一样,我有一个不同的主体和发件人的邮件,我没有因为隐私原因而提出):
body =Some body
subject =Some Subject
email = user.email#user.email返回一个有效的电子邮件地址
mail.send_mail('something@myappid.appspotmail.com',email,subject,body)
这些代码在没有Exception的情况下执行,我的App Engine配额对Mail API的调用增加,发送的电子邮件数量的配额也增加,表示发送成功的电子邮件。但是,当我检查我的邮件时,我没有收到邮件。
我尝试更改主题,正文,发件人电子邮件等,但我是否收到邮件似乎完全是随机的 - 我有时(很少)收到邮件,而在其他时间收到邮件。这些邮件甚至不在我的垃圾邮件文件夹中。
发生了什么事?我该如何确保每次收到邮件? 解决方案
对于第二个问题:无法确保邮件(没有额外的额外收据确认服务 - 一个不同的野兽),你最多可以检测它们是否顺利通过邮件发送基础设施。另请参阅 web2py中的mail.send()功能用于不存在的退回的电子邮件/电子邮件地址。 Here's the code I'm using to send mail (not exactly, I have a different body, subject and the sender's mail that I haven't put up for privacy reasons): The code executes without Exception, my App Engine Quota for calls to the Mail API increases, as does the quota for the number of emails sent, indicating a successful email send. However, when I check my mail, I do not get the email. I've tried changing the subject, body, sender email etc. but whether or not I receive the mail seems totally random - I receive it sometimes (rarely) and don't at other times. The mails aren't even there in my spam folder. What's going on? And how do I ensure that the mail is received each time? For the 2nd question: you can't ensure the messages are received (without an additional extra receipt acknowledging service - a different beast), you can, at best, detect if they are passed successfully to the mail sending infrastructure or not. See also mail.send() feature in web2py for bounced email/ email address that doesnt exist. 这篇关于Google App Engine(Python) - 邮件已发送但未收到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!body="Some body"
subject="Some Subject"
email = user.email # user.email returns a valid email address
mail.send_mail('something@myappid.appspotmail.com', email, subject, body)