2016-03-06 17 views
1

我測試的所有示例與此郵件發件人:https://putsmail.com/tests/new爲Google Mail(以及其他軟件)添加直接操作?

我閱讀文檔:https://developers.google.com/gmail/markup/getting-started#your_first_markup

而這正是我想要的(例如)。通常我想要一個普通的URL點擊操作。預訂是下一個級別。

Reservation direct action on GMail

第一次測試是JSON-LD之一:

<html> 
    <body> 
    <script type="application/ld+json"> 
    { 
     "@context":    "http://schema.org", 
     "@type":     "EventReservation", 
     "reservationNumber":  "IO12345", 
     "underName": { 
     "@type":    "Person", 
     "name":    "John Smith" 
     }, 
     "reservationFor": { 
     "@type":    "Event", 
     "name":    "Google I/O 2013", 
     "startDate":   "2013-05-15T08:30:00-08:00", 
     "location": { 
      "@type":    "Place", 
      "name":    "Moscone Center", 
      "address": { 
      "@type":   "PostalAddress", 
      "streetAddress": "800 Howard St.", 
      "addressLocality": "San Francisco", 
      "addressRegion": "CA", 
      "postalCode":  "94103", 
      "addressCountry": "US" 
      } 
     } 
     } 
    } 
    </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> 

然後我試圖用這個微觀數據的事情:

<html> 
    <body> 
    <div itemscope itemtype="http://schema.org/EventReservation"> 
     <meta itemprop="reservationNumber" content="IO12345"/> 
     <div itemprop="underName" itemscope itemtype="http://schema.org/Person"> 
     <meta itemprop="name" content="John Smith"/> 
     </div> 
     <div itemprop="reservationFor" itemscope itemtype="http://schema.org/Event"> 
     <meta itemprop="name" content="Google I/O 2013"/> 
     <time itemprop="startDate" datetime="2013-05-15T08:30:00-08:00"/> 
     <div itemprop="location" itemscope itemtype="http://schema.org/Place"> 
      <meta itemprop="name" content="Moscone Center"/> 
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> 
      <meta itemprop="streetAddress" content="800 Howard St."/> 
      <meta itemprop="addressLocality" content="San Francisco"/> 
      <meta itemprop="addressRegion" content="CA"/> 
      <meta itemprop="postalCode" content="94103"/> 
      <meta itemprop="addressCountry" content="US"/> 
      </div> 
     </div> 
     </div> 
    </div> 
    <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> 

但我從來沒有看到這個按鈕。在郵件的源代碼中,我看到:

Delivered-To: [email protected] 
Date: Sun, 06 Mar 2016 22:40:14 +0000 
From: [email protected] 
To: [email protected] 
Message-ID: <[email protected]b787.mail> 
Subject: test 
Mime-Version: 1.0 
Content-Type: multipart/alternative; 
boundary="--==_mimepart_56dcb1ceba24_33fda3a013ebc75828"; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 

----==_mimepart_56dcb1ceba24_33fda3a013ebc75828 
Content-Type: text/plain; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 


----==_mimepart_56dcb1ceba24_33fda3a013ebc75828 
Content-Type: text/html; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 


<html> 
    <body> 
    <div itemscope itemtype="http://schema.org/EventReservation"> 
     <meta itemprop="reservationNumber" content="IO12345"/> 
     <meta itemprop="reservationStatus" content="Ok"/> 
     <div itemprop="underName" itemscope itemtype="http://schema.org/Person"> 
     <meta itemprop="name" content="John Smith"/> 
     </div> 
     <div itemprop="reservationFor" itemscope itemtype="http://schema.org/Event"> 
     <meta itemprop="name" content="Google I/O 2013"/> 
     <time itemprop="startDate" datetime="2013-05-15T08:30:00-08:00"/> 
     <div itemprop="location" itemscope itemtype="http://schema.org/Place"> 
      <meta itemprop="name" content="Moscone Center"/> 
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> 
      <meta itemprop="streetAddress" content="800 Howard St."/> 
      <meta itemprop="addressLocality" content="San Francisco"/> 
      <meta itemprop="addressRegion" content="CA"/> 
      <meta itemprop="postalCode" content="94103"/> 
      <meta itemprop="addressCountry" content="US"/> 
      </div> 
     </div> 
     </div> 
    </div> 
    <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> 

----==_mimepart_56dcb1ceba24_33fda3a013ebc75828-- 

也許你知道這是怎麼工作的?

回答

1

您需要從您自己的帳戶發送電子郵件或列入白名單並通過DKIM或SPF驗證郵件。有關更多詳細信息,請參見https://developers.google.com/gmail/markup/registering-with-google

+0

非常感謝!我不知道爲什麼我會閱讀該怎麼做,然後我相信每個人都可以做到這一點。我嘗試使用示例郵件向我的應用程序註冊Google白名單。謝謝。 – Patrick

相關問題