通过Google Apps脚本从其他电子邮件地址发送电子邮件 [英] Email via Google Apps Script from another email address

查看:67
本文介绍了通过Google Apps脚本从其他电子邮件地址发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我熟悉如何通过Google Apps脚本(http://code.google.com/googleapps/appsscript/articles/sending_emails.html)发送电子邮件.太酷了.但是,是否可以通过我可以访问的另一个电子邮件地址通过Apps Script通过电子邮件发送电子邮件?看来我可以指定对地址的回复,但是我相信用户仍然会从我的主要用户帐户中看到该电子邮件.

I'm familiar with how to send emails via Google Apps Script (http://code.google.com/googleapps/appsscript/articles/sending_emails.html). It's super cool. But is there a way I can email from Apps Script from another email address that I have access to? It seems like I can specify a reply to address, but the user still sees the email as from my primary user account, I believe.

示例:我的电子邮件是user@domain.com,但是我想使用Apps脚本Javascript发送来自event@domain.com的电子邮件.

Example: My email is user@domain.com, but I'd like to send the email from event@domain.com from the Apps Script Javascript.

谢谢您的建议.

推荐答案

实现此目标的唯一方法是使用所需电子邮件帐户登录(在您的情况下为"event@domain.com")并运行脚本.如果您通过触发器自动运行脚本,则只需使用此帐户设置触发器.如果您没有该帐户,则必须创建一个帐户.

The only way to achieve that is by logging with the account of desired email, in your case "event@domain.com" and run the script with it. If you're running the script automatically via a trigger, just set the trigger with this account. If you do not have an account for it, you'd have to create one.

无法调整发件人"字段.Apps脚本跟踪器上存在一个与此相关的未解决问题:问题172:能够从用户不同帐户发送电子邮件(gmail中的发件人:"字段)

Adjusting the from field is not possible. There's an open issue about this on Apps Script tracker: Issue 172: Ability to send email from users different accounts ("from:" field in gmail)

-update:通过点击上面的链接可以看到,如果所需的地址是您的gmail中的别名,则现在可以做到这一点.

--update: as one can see by following the link above, this is now possible if the desired address is an alias in your gmail.

这篇关于通过Google Apps脚本从其他电子邮件地址发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆