Home > other >  MailApp.sendEmail sending email to my inbox even my even not set together to get the email
MailApp.sendEmail sending email to my inbox even my even not set together to get the email

Time:10-05

I have an email script that will send out email to all emails that are in the list of a google sheet. But then, when I run the script, it is also sent to my Inbox instead of only to register into my Sent folder. Before this no issue (after being using the same script for a long time, 1 year), it just happened a few months back.

I've found similar issue from this enter image description here enter image description here

CodePudding user response:

Change this: MailApp.sendEmail({to: email,subject: sub, htmlBody: body});

to this: GmailApp.sendEmail(emai,sub,'',{htmlBody:body});

  • Related