shumway21
shumway21

Reputation: 79

GAS MailApp allways sends a copy of email to script owner's email too

I just wanted to know if this behaviour is normal. Is it suppose to send a copy of the mail to me as the script owner, as well as the intended recipient? For example this code:

function emailTest(){

MailApp.sendEmail("[email protected]","test subject","test body"); 
}

Will send out an email to [email protected]. I will also get a copy in my inbox as the script owner. Can I shut this off somehow?

Regards,

Shumway

Upvotes: 1

Views: 62

Answers (1)

HDCerberus
HDCerberus

Reputation: 2153

Because you're sending the mail from your account, you'll see the message in your 'Sent' box. If you're seeing it in your Inbox, it's not related to the script itself, as this is only sending to "[email protected]".

Things to check:

  • You don't have a forwarding rule from "[email protected]" to your account.
  • You don't have a filter/mail client/ other service accessing your inbox and placing your sent mail in the inbox.
  • You're not looking at 'All Mail'. Etc, etc.

You can probably get help for this at: https://productforums.google.com/forum/#!categories/apps/mail-settings.

Upvotes: 1

Related Questions