Gmail电子邮件标记无法使用发票和script.google.com

时间:2017-01-24 22:48:44

标签: gmail google-schemas

我正在https://developers.google.com/gmail/markup/reference/invoice上测试此标记https://script.google.com/,因此我会丢弃所有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>

正如您所看到的,代码应该没问题。好的,我执行代码并收到此信息(请在beggining中添加“h”,stackoverflow不要让我添加2个以上的链接):

https://i.stack.imgur.com/bg8S2.png

https://i.stack.imgur.com/ituM0.png

我做错了什么? http://gmail-actions.appspot.com/上的一键操作可以正常工作,但我无法获得工作发票。

0 个答案:

没有答案