Message blocked - Your message to has been blocked. Message rejected - Delivery Status Notification (Failure)

2,354 views
Skip to first unread message

Alan Wells

unread,
Jul 13, 2020, 6:00:23 PM7/13/20
to Google Apps Script Community
If I put the text:

Line one Line Two Line Three

In an email body, the email gets blocked.
Obviously, there's nothing wrong with the content.

The email is sent from a Google G Suite account that I own to another free Google account that I own,
and I didn't block the email for any reason.

I hesitate to create an issue on the Issue Tracker, because I don't know if it's reproducible.
The email is sent with MailApp.sendMail() from a GSuite account to a free / consumer account.

The help information in the Delivery Status Notification (Failure) email is useless.

Message blocked

Your message to aj.a...@gmail.com has been blocked. See technical details below for more information.
LEARN MORE
The response was:

Message rejected. See https://support.google.com/mail/answer/69585 for more information.




Jorge Forero

unread,
Jul 13, 2020, 6:18:12 PM7/13/20
to google-apps-sc...@googlegroups.com
Alan,

I would suggest to use GmailApp.sendMail() instead of MailApp.sendMail().

Jorge




--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/740c3243-98c5-49b1-8225-110542e1ff16o%40googlegroups.com.

CBMServices Web

unread,
Jul 13, 2020, 7:08:27 PM7/13/20
to google-apps-sc...@googlegroups.com
Is this a new Gsuite account? I had the exact same problem but only with the MailApp. Using the GmailApp worked fine for me. It too several weeks and then eventually it worked fine by itself.

Never got a good answer from Google support on why and I had joined this forum to ask that question at the time and nobody knew why either.


Alan Wells

unread,
Jul 13, 2020, 7:10:27 PM7/13/20
to Google Apps Script Community
Thank, you.  That's a good idea.  It's for an add-on , so I'll need to change the scope and get it re-approved.
I've wanted to do that, but there's too many things to do and not enough time.

On Monday, July 13, 2020 at 6:18:12 PM UTC-4, Jorge Forero wrote:
Alan,

I would suggest to use GmailApp.sendMail() instead of MailApp.sendMail().

Jorge




On Mon, Jul 13, 2020 at 5:00 PM Alan Wells <aj.a...@gmail.com> wrote:
If I put the text:

Line one Line Two Line Three

In an email body, the email gets blocked.
Obviously, there's nothing wrong with the content.

The email is sent from a Google G Suite account that I own to another free Google account that I own,
and I didn't block the email for any reason.

I hesitate to create an issue on the Issue Tracker, because I don't know if it's reproducible.
The email is sent with MailApp.sendMail() from a GSuite account to a free / consumer account.

The help information in the Delivery Status Notification (Failure) email is useless.

Message blocked

Your message to aj.a...@gmail.com has been blocked. See technical details below for more information.
LEARN MORE
The response was:

Message rejected. See https://support.google.com/mail/answer/69585 for more information.




--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

Alan Wells

unread,
Jul 13, 2020, 7:14:35 PM7/13/20
to google-apps-sc...@googlegroups.com
No, it's not a new G Suite account, but thank you for confirming that GmailApp fixed the problem for you.
What I might try is to add the GmailApp scope, leave the old mail scope, and have both in the code.
I'm not sure if there will be a disruption to users when switching over, and getting it approved.

CBMServices Web

unread,
Jul 13, 2020, 7:21:57 PM7/13/20
to google-apps-sc...@googlegroups.com
As a suggestion which you might want to do.  When I had this issue, I took the step to centralize all my sendEmail calls so can make the change back and forth behind an access layer easily without disrupting the rest of the code. It helped because this became the central place to check against quotas, log any failed sends, etc..

Reply all
Reply to author
Forward
0 new messages