MailApp.sendEmail不工作? [英] MailApp.sendEmail Not Working?

查看:907
本文介绍了MailApp.sendEmail不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google文档电子表格中有几个脚本,它们使用MailApp.sendEmail发送合并电子表格数据的电子邮件。他们都工作了很多年。大约两周前,他们停止发送电子邮件。脚本仍然运行,我没有得到任何错误。电子邮件从来没有通过。没有任何改变,除了电子邮件不再有任何改变。



有什么想法?

谢谢!

解决方案

我想我对自己的问题有一个答案,这对任何有此问题的人都有帮助。确实,MailApp.sendEmail确实还在工作。如果我使用MailApp.sendEmail向第三方发送电子邮件,它将会得到通过,没问题。正如Fashtas指出的那样,如果我使用MailApp.sendEmail向电子表格所属的Gmail帐户发送电子邮件,则不会有任何问题。



以下是问题所在:如果我使用MailApp.sendEmail将邮件发送给第三方帐户,该帐户会自动将BACK转发到电子表格所属的Gmail帐户,则这些邮件不再通过。



因此,在上面发布的示例代码中,matt @ .com电子邮件地址会自动转发回我的Gmail帐户。 MailApp.sendEmail发送的邮件会发送到 .com邮件服务器,但由于某些原因,邮件不会被转发回我的Gmail收件箱。它们出现在Gmail已发送邮件文件夹中(大概是因为它们是由电子表格所属的Gmail帐户发送的),但它们从未打到收件箱。



这种行为是新。过去,这些邮件从 * .com服务器转发到我的Gmail收件箱没有任何问题。我不知道导致问题的原因是什么。我不知道如何解决它。



但是我认为我的问题的答案是MailApp.sendEmail按设计工作。


I have several scripts in Google Docs spreadsheets that use MailApp.sendEmail to send e-mails incorporating data from the spreadsheets. They've all worked marvelously for years. About 2 weeks ago, they stopped sending the e-mails. The scripts still run and I don't get any errors. The e-mails just never come through. Nothing has changed, except that the e-mails aren't arriving anymore.

Any thoughts?

Thanks!

解决方案

I think I have an answer to my own question, which may be helpful to anybody else who has this problem. MailApp.sendEmail DOES, indeed, still seem to be working. What has changed is the way Gmail is handling certain types of messages.

If I use MailApp.sendEmail to send an e-mail to a third party, it'll get through, no problem. As pointed out by Fashtas, if I use MailApp.sendEmail to send an e-mail to the Gmail account that the spreadsheet belongs to, no problem.

Here's the problem: if I use MailApp.sendEmail to send the message to a third party account that automatically forwards BACK to the Gmail account that the spreadsheet belongs to, those messages no longer get through.

Therefore, in the sample code I posted above, the matt@.com e-mail address automatically forwards back to my Gmail account. The messages sent by the MailApp.sendEmail make it through to the .com mail server, but for some reason, they don't get forwarded back to my Gmail inbox. They appear in the Gmail Sent Items folder (presumably because they were sent by the Gmail account that the spreadsheet belongs to), but they never hit the inbox.

That behavior is new. In the past, there has been no problem with those messages getting forwarded from the *.com server to my Gmail inbox. I don't know what changed to cause the problem. And I don't know how to fix it.

But I, therefore, think the answer to my question is that MailApp.sendEmail IS working as designed.

这篇关于MailApp.sendEmail不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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