MailApp/GmailApp无法将密件抄送发送到地址别名 [英] MailApp/GmailApp fails to send bcc to address alias
问题描述
我正在使用GmailApp/MailApp发送通知电子邮件,我想使用地址别名"对自己的密件抄送,但没有电子邮件发送到我的gmail.
I'm using GmailApp/MailApp to send notification emails, and I want to bcc my self using an "address alias", but no email is delivered to my gmail.
示例:
电子邮件已发送至 someone@somedomain.com <-工作原理
密件抄送被发送到 mygmailacct+notifications@gmail.com <-不起作用
Email is sent to someone@somedomain.com <- Works
BCC is sent to mygmailacct+notifications@gmail.com <- Does not work
如果我从密件抄送中删除了地址别名",则该地址有效;
密件抄送被发送到 mygmailacct@gmail.com <-Works
If I remove the "address alias" from my BCC, it works;
BCC is sent to mygmailacct@gmail.com <- Works
但是,这意味着我无法正确过滤通知等.
However this means I can't filter the notifications properly etc.
将电子邮件从其他电子邮件帐户发送到 mygmailacct+notifications@gmail.com 可以正常工作.
Sending an email to mygmailacct+notifications@gmail.com from some other email account works fine as expected.
代码:
function sendEmail(to, subject, body) {
// Default options
var options = {
name: 'System notifications',
bcc: 'gmail.accnt+notification@gmail.com'
};
MailApp.sendEmail(to, subject, body, options);
}
规则:
Matches: to:(mygmailacct+notifications@gmail.com)
Do this: Apply label "notifications", Never send it to Spam, Mark it as important
推荐答案
您的代码看起来还不错,可能是跳过了您的收件箱,请尝试查看所有邮件或已发送邮件
Your code looks okay, It is probably skipping your inbox, try looking in All Mail or Sent Mail
为防止混乱,Gmail不会路由您发送到您的邮件的邮件 自己的收件箱别名.您可以在已发送邮件"或全部"中找到邮件 邮件.如果您需要在收件箱"中查看发送到您别名的邮件,则可以 可以将别名配置为以下地址的备用发送为"地址 您的帐户. -来源
To prevent clutter, Gmail doesn't route messages that you send to your own alias to your inbox. You can find the message in Sent Mail or All Mail. If you need to see messages sent to your alias in the Inbox, you can configure the alias as an alternate "Send mail as" address for your account. — Source
这篇关于MailApp/GmailApp无法将密件抄送发送到地址别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!