Re: MailApp.sendEmail not working

52 views
Skip to first unread message
Message has been deleted

Joe Davis PPC

unread,
Dec 14, 2023, 11:43:44 AM12/14/23
to Google Ads Scripts Forum
Hi Kevin, 

I would suggest that you try to add your email as a global variable, which means outside of the main function.

Example:

var EMAIL = 'em...@example.com';

function main() {
  MailApp.sendEmail({
    to: EMAIL,
    subject: "subject",
    body: "message"
  });
}

Hope this helps!

Kind Regards,

Joe

On Wednesday 29 November 2023 at 09:53:12 UTC Kevin Brinkman wrote:
I have some scripts that don't send any emails anymore. To test this, I've created a simple script, but still I receive no email. I tried to send it to my personal mail, but same result.

Do other people have this issue as well?

function main() {
  MailApp.sendEmail({
    to: "myn...@companyname.nl",
    subject: "subject",
    body: "message"
  });
}

Kevin Brinkman

unread,
Dec 18, 2023, 4:34:37 AM12/18/23
to Google Ads Scripts Forum
apologies, there was nothing wrong with the scripts. IT did some changes te prevent spoofing. We were able to fix this. Thanks for the help!
Reply all
Reply to author
Forward
0 new messages