2

我一直在尝试为我们的订单创建一个 Google 订单架构标记。但是,当我使用 google App Script Test 运行它时,我生成的 html 模板有效

Google App 脚本中的 Code.gs 文件

function testSchemas() {
 var htmlBody = HtmlService.createHtmlOutputFromFile('template_html').getContent();

MailApp.sendEmail({
 // to: Session.getActiveUser().getEmail(),
   to:'MY GMAIL EMAIL',
subject: 'Test Actions in the Inbox - ' + new Date(),
htmlBody: htmlBody,
 });
 }

但是,当我在 nodemailer 中使用相同的 html 模板并使用 Gmail 服务以相同的 gmail 凭据运行 nodemailer 时,我找不到“查看订单”部分。

我知道 to: and from: 地址需要相同才能测试模式,并且我有相同的往返地址。

我的 nodemailer 配置看起来像:

var smtpTransport = nodemailer.createTransport("SMTP",{
service: "Gmail",
auth: {
    user: "GMAIL EMAIL",
    pass: "PASSWORD"
}
});

 smtpTransport.sendMail(mailOptions,function(err,response){console.log('Done');});

Google 表示您的电子邮件必须启用 SPF/DKIM 才能阻止网络钓鱼攻击,但当我使用 Gmail 服务时,情况并非如此。

谁能告诉我这可能是什么原因,以及在我向 Google 提出将我的 IpP 列入白名单的请求之前如何使用节点邮件程序对其进行测试的解决方法。

另外,我们可以让谷歌订单在谷歌即时显示为谷歌卡吗?

4

0 回答 0