2

I do not have access to our corporate No-reply Email address to use GmailApp.sendEmail as an alias, so I'm stuck with MailApp.sendEmail

I already have the reply-to corrected; but I am trying to get the actual FROM on the email to show something other than my email address, any suggestions?

   MailApp.sendEmail(emailAddress, "NO-REPLY@xxxxx.com", subject, message); 

Thank you in advance.

JasonG
  • 39
  • 7
  • I've looked into this extensively as I tried but the only way to do it is through ```GmailApp.sendEmail()``` and then you can send from an alias. – Gav Dec 17 '20 at 16:25
  • @Gav but I believe the email address has to be a real email address that you can confirm access to. (Yes/No?) – Cooper Dec 17 '20 at 19:44
  • @Cooper - yes correct as when adding an alias in gmail you have to approve via a code sent to the email address you are adding. – Gav Dec 17 '20 at 20:25

2 Answers2

2

Answer:

You can specify the option noReply in order to discourage recipients from responding to emails. However, you have to call the function sendEmail in a different way: sendEmail(recipient, subject, body, options) The parameter options is a Javascript option and looks like this:

options = {
  noReply: true
}

But keep in mind that if you use noReply you can't specify a replyTo address. If you want to provide one for them to reply I would specify it in the message. Futhermore, for future cases I recommend you to use GmailApp instead of MailApp as it has more features.

References:

fullfine
  • 1,371
  • 1
  • 4
  • 11
  • Sadly, I don't have access to the email address as an Alias to send using the Gmail send option. Thank you! – JasonG Dec 18 '20 at 13:23
0

Another way is to just create a custom Gmail account for running scripts. You can add a custom name and choose a good avatar

aoa
  • 15
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 02 '23 at 22:04