1
votes

Google announced a change to Mail Service in Apps Script which says:

Starting on September 13, 2016, users with free public Google Accounts (consumers) and Google Apps for Education and Google Apps Free edition users, will be required to have Gmail access to send messages through Apps Script’s Mail Service

For developers of Google Add-ons that use the MailApp Service how can you test if:

  1. the user needs Gmail enabled to use MailApp; and
  2. if Gmail is needed it is enabled on their account
2

2 Answers

1
votes

try

var resource = AdminDirectory.Users.get(userEmail);
Logger.log(resource.isMailboxSetup);

from Directory API

or

try {
  var sent = false;
  GmailApp.sendEmail();
  sent = true;
} catch(e) { Logger.log(e); }

Logger.log(sent);
0
votes

Since you can now create a Google account with an "external" address and not have an @gmail address (like I do with my Google Apps Edu version), you have to have an @gmail address to keep on using the GmailApp sendmail feature.

This line says : "Consumers can enable Gmail on their Google account after signing-in—note your Gmail will then become the primary address of your Google account", which I interpret as "you could login with your @somethingelseaddress.com, but you have to enable Gmail to send mails with GmailApp, and you won't be able to login with your @something... address.

But I might be wrong, you know !