Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid the "This message may not have been sent by" warning when sending email using Google App Engine?

I have a python GAE app that sends emails like in the example using the address of a registered administrator for the application as the "sender" address. When an email arrives from such an API call, here's a pic of the attached warning.

This message may not have been sent by: [email protected] Learn more Report phishing

Am I doing something wrong? None of the 3 options mentioned in the "Learn More" link are relevant I believe: the sender is a gmail address so the "SPF and DKIM authentication" solution isn't relevant, I'm not sending to a mailing list and I'm not using SMTP (I think, though maybe GAE is...).

like image 689
ubershmekel Avatar asked Dec 23 '11 20:12

ubershmekel


People also ask

Why do my emails have a Be careful with this message warning?

Google automatically adds 'be careful with this message' to emails that could be suspicious. When Google detects a potentially malicious email, Gmail and Google Workspace users see a warning in a colored bar at the top of the email.

What stops an email from being sent?

Recipient's mail server blocked the e-mail E-mails are sent and received through a mail server. Sometimes, a message sent from another mail server may be blocked due to suspicious content found in those which were sent previously. Suspicious content can include viruses, malware, and links to certain websites.

Why are my emails marked as unsafe?

Gmail may sometimes display a red warning banner when you receive an email from suspicious senders. The banner usually reads as follows: This message seems dangerous. Many people marked similar messages as phishing scams, so this might contain unsafe content.


1 Answers

Assuming you're seeing this in production, it's probably because you're claiming to be from a gmail address, but sending via App Engine. Use one of your app's email addresses as the sender ([email protected]) and it should work fine.

like image 153
Nick Johnson Avatar answered Oct 19 '22 13:10

Nick Johnson