Gmail电子邮件标记不适用于发票和script.google.com

Gmail电子邮件标记不适用于发票和script.google.com,gmail,google-schemas,Gmail,Google Schemas,我正在测试这个标记,所以我放弃了所有SPF问题 这是JS: function testSchemas() { var htmlBody = HtmlService.createHtmlOutputFromFile('mail_template').getContent(); MailApp.sendEmail({ to: Session.getActiveUser().getEmail(), subject: 'Test Email markup - ' + new D

我正在测试这个标记,所以我放弃了所有SPF问题

这是JS:

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

  MailApp.sendEmail({
    to: Session.getActiveUser().getEmail(),
    subject: 'Test Email markup - ' + new Date(),
    htmlBody: htmlBody,
  });
}
这是HTML

<html>
  <head>

<script type='application/ld+json'>
{
  "@context": "http://schema.org",
  "@type": "Invoice",
  "accountId": "123-456-789",
  "minimumPaymentDue": {
    "@type": "PriceSpecification",
    "price": "$70.00"
  },
  "paymentDue": "2015-11-22T08:00:00+00:00",
  "paymentStatus": "PaymentAutomaticallyApplied",
  "provider": {
    "@type": "Organization",
    "name": "Mountain View Utilities"
  },
  "totalPaymentDue": {
    "@type": "PriceSpecification",
    "price": "$70.00"
  }
}
</script>

  </head>
  <body>
    <p>
      This a test for a Go-To action in Gmail.
    </p>
  </body>
</html>

{
“@context”:”http://schema.org",
“@type”:“发票”,
“accountId”:“123-456-789”,
“最低到期付款额”:{
“@type”:“PriceSpecification”,
“价格”:“$70.00”
},
“应付款项”:“2015-11-22T08:00:00+00:00”,
“paymentStatus”:“PaymentAutomaticallyApplied”,
“提供者”:{
“@type”:“组织”,
“名称”:“山景实用程序”
},
“到期总付款额”:{
“@type”:“PriceSpecification”,
“价格”:“$70.00”
}
}

这是对Gmail的一个测试。

正如您所看到的,代码应该很好。好的,我执行代码并收到此消息(请在beggining添加“h”,stackoverflow不允许我添加超过2个链接):


我做错了什么?一键操作就可以了,但我无法获得有效发票。

好吧,你只能通过给自己发送电子邮件来测试你的gmail模式。发件人和收件人为同一帐户的所有电子邮件都忽略了注册要求,可以用于自我测试。请注意,自我测试仍然需要DKIM或SPF身份验证。在向其他用户发送电子邮件之前,请确保您已在谷歌注册。你可以在这里找到它。如需了解更多信息,请检查此项是否对您有所帮助。谢谢@Kendi,正如您在图片上看到的,西班牙语中的“from”是“yo”,英语中的“me”。在另一张照片上,我必须划掉地址,因为这是我的地址发送到我的地址进行自我测试。我复制粘贴了与您看到的完全相同的脚本。我现在再次尝试使用相同的脚本,在上,您可以看到我也有DKIM和SPF身份验证,所以我真的不知道我做错了什么…@punchi Invoice schemas将只与Inbox()集成。你能登录收件箱看看你的邮件在那里是否正常工作吗?@Franco如你所说,只在谷歌收件箱上工作,谢谢(已经有了关于该信息的答案,但已被删除)