4
votes

We establish Google G Suite for our clients and over the last few weeks, we have found that Google Apps Script does not process the MailApp.sendEmail() as expected. It only happens in new G Suite account and the exact same code in existing account function as expected.

function testemail(){
  MailApp.sendEmail("gordon@........", "TEST", "Hello world");
  return;
}

Email address that we have used are valid email.

Any ideas?

1
Looks like an account configuration error. Try to compare the configurations. You'll probably be better off asking this in the webapps stackexchange. Also, check if you're able to sent emails from the gmail interface in this new account.Casper

1 Answers

8
votes

Try using GmailApp.sendEmail()

// The code below will send an email with the current date and time.
var now = new Date();
GmailApp.sendEmail("[email protected]", "current time", "The time is: " + now.toString());

which is the recommended one now.