未显示Google电子邮件标记定位类型

时间:2018-09-18 13:58:38

标签: javascript html email gmail schema

  

我正在尝试在我的Gmail中添加Google电子邮件标记定位类型,但是   操作按钮未显示,任何人都可以让我知道我在做什么   错误。   请使用我写在script.google.com的code.gs文件和第二个id mail_template.html文件中的文件功能。

<html>
  <body>
 
<!-- JSON-LD markup generated by Google Structured Data Markup Helper. -->
<script type="application/ld+json">
{
  "@context" : "http://schema.org",
  "@type" : "EventReservation",
  "reservationNumber" : "IO123456",
  "reservationStatus" : "confirmed",
  "reservationFor" : {
    "@type" : "Event",
    "name" : "Google I/O 2018",
    "startDate" : "2018-10-15T08:30:00-08:00",
    "location" : {
      "@type" : "Place",
      "name" : "will smith town",
      "address" : {
        "@type" : "PostalAddress",
        "streetAddress" : "Moscone Center",
        "addressLocality" : ", 800 Howard St",
        "addressRegion" : "San Francisco",
        "addressCountry" : "CA",
        "postalCode" : "94103"
      }
    }
  },
  "underName" : {
    "@type" : "Person",
    "name" : "Shalin Rabdu"
  }
}
</script>
    <p>
      Dear John, thanks for booking your Google I/O ticket with us.
    </p>
    <p>
      BOOKING DETAILS<br/>
      Reservation number: IO12345<br/>
      Order for: John Smith<br/>
      Event: Google I/O 2013<br/>
      Start time: May 15th 2013 8:00am PST<br/>
      Venue: Moscone Center, 800 Howard St., San Francisco, CA 94103<br/>
    </p>
  </body>
</html>

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

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

enter image description here

0 个答案:

没有答案