Google App Engine (Python) - mail sent but not received

Here is the code that I use to send mail (not really, I have a different body, subject and sender mail that I did not put out for privacy reasons):

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)

The code runs without Exception, my App Engine quota for calls to the Mail API is increasing, as well as the quota for the number of emails sent, indicating that the email was sent successfully. However, when I check the mail, I do not receive the letter.

I tried to change the subject, body, email sender, etc., but regardless of whether I receive mail, it seems completely random - I receive it sometimes (rarely) and not at other times. My spam folder doesn't even have emails.

What's happening? And how can I guarantee that mail will be received every time?

+4
source share
1 answer

In the second question: you cannot ensure receipt of messages (without the additional service of confirming receipt receipt - another beast), you can at best determine whether they have been successfully transferred to the mail sending infrastructure or not. See also the mail.send () function in web2py for a scanned email address / email address that does not exist .

0
source

All Articles