0

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

MailApp.sendEmail with {noReply:true} sends emails from "noreply@domain.com". 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('you@google.com', 'subject', 'body', {name: 'MyBot', noReply: true});

What steps will reproduce the problem? 1. MailApp.sendEmail('you@google.com', '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 "noreply@domain.com".

Sri
  • 1
  • 1
  • 1
  • This is just a crosspost of the content in the link. You haven't stated any question. – Guenther Sep 21 '16 at 19:32
  • Maybe you can add an user noreply@domain.com to your domain, and then send it from there ;-) – Wim den Herder Sep 21 '16 at 19:51
  • The question is in the post/link - how do j show a different user (like mybot) instead of noreply – Sri Sep 23 '16 at 01:37
  • 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 address – Sri Sep 23 '16 at 01:39

1 Answers1

0

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!

Community
  • 1
  • 1
Teyam
  • 7,686
  • 3
  • 15
  • 22