Avoiding the restricted email scope - GMailApp verses MailApp

76 views
Skip to first unread message

Alan Wells

unread,
May 5, 2020, 9:52:31 AM5/5/20
to Google Apps Script Community
The Apps Script documentation for GmailApp only shows one scope, the broad, restricted mail service scope.  It fails to explain that there is a GmailApp Scope that is as narrow as the MailApp scope and can be used for just sending an email with GmailApp. That scope is: "https://www.googleapis.com/auth/gmail.send"

I do not recommend using MailApp, even if all you want to do is send an email, for add-ons or apps used by anyone other than the owner of the script.

If the script is just for your own use, then using MailApp is probably not going to cause a problem.  But if you want to distribute an app to the public, then I would never use MailApp.

There have been problems with the MailApp service failing to send emails in some situations inside of domains. GmailApp is the mail service that seems to be the "standard" that works the best. Also, if you use the GmailApp scope of "https://www.googleapis.com/auth/gmail.send" , that scope is not a "restricted" scope. It's still a "sensitive" scope, but so is MailApp scope to just send an email.

Darren D'Mello

unread,
May 5, 2020, 10:22:08 PM5/5/20
to google-apps-sc...@googlegroups.com
But we heard that if we use GMail scrope, we need to pau 15000$ for oauth scope verification.

Is that correct Alan?

--
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/24911e67-95fa-40f9-84cd-2c5734a3f872%40googlegroups.com.


--
Best,
Darren

Alan Wells

unread,
May 6, 2020, 7:39:47 AM5/6/20
to Google Apps Script Community
You will not need to pay the security assessment of $15,000 or more if you use the Gmail scope:


That scope only allows GMailApp to SEND an email.  You can not make email settings, or get existing emails.

On Tuesday, May 5, 2020 at 10:22:08 PM UTC-4, miscellaneousmailer wrote:
But we heard that if we use GMail scrope, we need to pau 15000$ for oauth scope verification.

Is that correct Alan?

On Tue, May 5, 2020 at 7:22 PM Alan Wells <aj.a...@gmail.com> wrote:
The Apps Script documentation for GmailApp only shows one scope, the broad, restricted mail service scope.  It fails to explain that there is a GmailApp Scope that is as narrow as the MailApp scope and can be used for just sending an email with GmailApp. That scope is: "https://www.googleapis.com/auth/gmail.send"

I do not recommend using MailApp, even if all you want to do is send an email, for add-ons or apps used by anyone other than the owner of the script.

If the script is just for your own use, then using MailApp is probably not going to cause a problem.  But if you want to distribute an app to the public, then I would never use MailApp.

There have been problems with the MailApp service failing to send emails in some situations inside of domains. GmailApp is the mail service that seems to be the "standard" that works the best. Also, if you use the GmailApp scope of "https://www.googleapis.com/auth/gmail.send" , that scope is not a "restricted" scope. It's still a "sensitive" scope, but so is MailApp scope to just send an email.

--
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.


--
Best,
Darren

Darren D'Mello

unread,
May 6, 2020, 9:17:19 PM5/6/20
to google-apps-sc...@googlegroups.com
Thanks Alan. It was once misunderstood that using Gmail scope would cause security assessment fees.

On Wed, May 6, 2020, 5:09 PM Alan Wells <aj.a...@gmail.com> wrote:
You will not need to pay the security assessment of $15,000 or more if you use the Gmail scope:


That scope only allows GMailApp to SEND an email.  You can not make email settings, or get existing emails.

On Tuesday, May 5, 2020 at 10:22:08 PM UTC-4, miscellaneousmailer wrote:
But we heard that if we use GMail scrope, we need to pau 15000$ for oauth scope verification.

Is that correct Alan?

On Tue, May 5, 2020 at 7:22 PM Alan Wells <aj.a...@gmail.com> wrote:
The Apps Script documentation for GmailApp only shows one scope, the broad, restricted mail service scope.  It fails to explain that there is a GmailApp Scope that is as narrow as the MailApp scope and can be used for just sending an email with GmailApp. That scope is: "https://www.googleapis.com/auth/gmail.send"

I do not recommend using MailApp, even if all you want to do is send an email, for add-ons or apps used by anyone other than the owner of the script.

If the script is just for your own use, then using MailApp is probably not going to cause a problem.  But if you want to distribute an app to the public, then I would never use MailApp.

There have been problems with the MailApp service failing to send emails in some situations inside of domains. GmailApp is the mail service that seems to be the "standard" that works the best. Also, if you use the GmailApp scope of "https://www.googleapis.com/auth/gmail.send" , that scope is not a "restricted" scope. It's still a "sensitive" scope, but so is MailApp scope to just send an email.

--
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.


--
Best,
Darren

--
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/b7db08a0-2f4a-4b02-84df-5b262b9c20cd%40googlegroups.com.

Efficient Small Business

unread,
May 7, 2020, 7:31:02 PM5/7/20
to Google Apps Script Community
Thanks for the tip!
Reply all
Reply to author
Forward
0 new messages