If you use GAS to send mail, it will be blocked.A free GMAIL account can be sent without any problems.

Asked 2 years ago, Updated 2 years ago, 82 views

I'm a beginner.Thank you for your cooperation.

I'd like to send an email via GoogleAppScript, but I can't because the following message came back to my contracted account's Gmail.

Block Mail
Your email to ○○@y ahoo.co.jp has been blocked.For more information, see the detailed technical information below.

We are running the following GASs:

function test(){
  MailApp.sendEmail({
    to: '●●●@y ahoo.co.jp',
    subject: 'Test!',
    name: 'Automatic Mail',
    body: 'This is a test',
  })
}

With the same content, I can send it without any problems by running the free version of ○○@g mail.com.
I can't send it with the paid account that I signed up with Google Workplace.
As a trial, if you send a regular email to the same address via your paid account GMAIL, you can send it without any problems.

When I contacted Google Workplace support, it may be considered a spam, so
SPF configuration was introduced and implemented. (We were introduced here because support would not know any more.)
Then, Google's following article (https://support.google.com/a/answer/174124?hl=ja)
I also set the DKIM configuration as shown in and tried it, but it will be in the same block state.

The only successful email that was sent to you (useful account email address).
Not for other Gmail accounts.

Is there anything I should try?

Thank you for your cooperation.

google-apps-script gmail

2022-09-29 22:33

1 Answers

The permissions seem to be a little loose, but
If you use GmailApp instead of MailApp, it may work.


2022-09-29 22:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.