我正在使用Google电子表格向客户发送评论 . 当他们提交评论时,会通过电子邮件发送给我 . 我用the MailApp.sendEmail method . 除了replyTo "advanced argument"之外,它按预期工作:
var myAdvancedArgs = { htmlBody: myHtmlBody, replyTo: customerEmail };
MailApp.sendEmail("me@example.com", "Comments Form", myBody, myAdvancedArgs);
customerEmail设置正确,因为我在邮件正文中输出正确 . htmlBody工作,因为我得到我的GMail帐户中显示的电子邮件的HTML版本 . 但是,当我点击GMail中的回复按钮时,To:地址就是我自己 . 似乎 replyTo
根本没有设置 . 但是我通过使用工具提示"Show Details"单击我姓名旁边的小三角形查看电子邮件的 Headers ,它确实提到了正确的回复地址:
reply-to: mycustomer@example.com
MailApp.sendEmail
未正确设置回复标头吗?
UPDATE :我发生了什么事 . reply-to
Headers 是不是't set properly (maybe that'不是你怎么回复?)或GMail对我不起作用 .
第一张图片,您会看到我的Google电子表格脚本创建了一个 reply-to
Headers :
第二张图片,当我点击GMail中的回复按钮时,地址是 not 填入 reply-to
Headers 中的地址:
3 回答
我找到了reason to your (and my) problem .
这是一个老问题,但如果我需要它,也许其他人也需要它!
From my testing the replyTo worked only when I sent the mail not to the form Acount mail. If your form is on your@gmail.com acount send it to yourOtherMail@gmail.com
刚试过这样的:
当我“回复”(使用gmail或任何邮件客户端中的回复按钮)时,它按预期工作,它显示如下:
即使确实发送者确实是脚本的作者(这也是预期的行为,请参见documentation about scripts),这确实是
replyTo
地址所以我担心issue you raised无效......