Gmail – Utilizing noreply option on Google Script SendEmail function

gmailgoogle-apps-script

I have a script that takes data from an existing data table and sends it out to a distro list.

A quick snippet of the code I'm using is:

var emailDelivery = templateSheet.getRange("C2").getValue();
var emailSubject = templateSheet.getRange("D2").getValue();
var emailText = templateSheet.getRange("E2").getValue();
var emailText = fillInTemplateFromObject(eNewRecBody, rowData);
var emailSubject = fillInTemplateFromObject(eNewRecSubject,rowData);
GmailApp.sendEmail(emailDelivery,emailSubject,emailText,{noreply:true});

Where fillInTemplateFromObject is a subfunction that parses regex items to pull from the table into the body/subject of the email.

The issue comes with the last line – the additional options in the sendEmail function are not applying; that is when it runs, it shows the emails are coming from my email, rather than a noreply account.

What could be causing this?

Best Answer

According to the documentation

this option [noreply] is only possible for Google Apps accounts, not Gmail users