0
votes

https://code.google.com/p/google-apps-script-issues/issues/detail?id=4635

MailApp.sendEmail with {noReply:true} sends emails from "[email protected]". Excellent. But the users see it as the raw email address. So I changed it to {name: 'MyBot', noReply: true} hoping to make the from be "MyBot ". No, that doesn't work. Please provide a small sample script that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.

MailApp.sendEmail('[email protected]', 'subject', 'body', {name: 'MyBot', noReply: true});

What steps will reproduce the problem? 1. MailApp.sendEmail('[email protected]', 'subject', 'body', {name: 'MyBot', noReply: true});

What is the expected output? What do you see instead?

What I expect is a sender of "MyBot ". I get a sender of "[email protected]".

1
This is just a crosspost of the content in the link. You haven't stated any question.Guenther
Maybe you can add an user [email protected] to your domain, and then send it from there ;-)Wim den Herder
The question is in the post/link - how do j show a different user (like mybot) instead of noreplySri
Having a user called noreply will not work. I even tried using a valid user but google script automatically uses the user who runs the script as the sender regardless of what I put in the from addressSri

1 Answers

0
votes

As shown in Class MailApp, set noreply to true if the email should be sent from a generic no-reply email address to discourage recipients from responding to emails and this option is only possible for Google Apps accounts, not Gmail users.

And, from this solution given in this SO post - It is possible to change the from address when using sendEmail? states that:

Google is not flexible on this one - the only "from" address that you can see is the one belonging to the user whose authority is running the script.

You may, however, try what was suggested wherein you need to develop your scripts as yourself, then republish them from the robot.

Hope that helps!