1
votes

I am using a variation of Google's MailApp.sendEmail() script ( https://developers.google.com/apps-script/articles/sending_emails) to send emails to addresses in a spreadsheet. To test the script I am sending them to another gmail account. However, the emails are being marked with the message: This message may not have been sent by: [email protected]. Is there any way to avoid this? Thanks!

1
Are you using a consumer or enterprise account? If enterprise, it may be necessary to review how your domain is configured to work with gmail. (See Issue 1278 for instance.)Mogsdad
It's a consumer account.MegFord
Looking at the SMTP message header, the difference between the header of the mail sent using the script & one from an email sent using gmail is that the message-id lists [email protected], whereas an email from my gmail account lists foo@ gmail.com.MegFord
I see those differences as well, but I'm not getting warnings. Have you read through this troubleshooter from google?Mogsdad
Maybe - I was trying with one consumer and one enterprise account, so a little different. You should write up your answer!Mogsdad

1 Answers

2
votes

This warning isn't caused by the MailApp.sendMail() script. The phishing warning only shows up when I send email between two gmail accounts (both of which belong to me). It doesn't show up when I send email to other accounts using the MailApp.sendMail() script. The warning also appears when I send a standard gmail message from one account to the other, when the sending account is a consumer account, and the receiving account is a university account. The message does not appear on emails from other people's gmail addresses and does not appear on messages sent from my university account to my consumer account.