将事件自动添加到Google日历

时间:2017-12-21 19:20:28

标签: php email google-schemas

我已经建立了一个网站来管理我为即兴喜剧而举办的研讨会。我希望确认电子邮件能够自动将事件添加到Google日历中。

我在电子邮件中包含的标记已经过验证 以下是我发送的电子邮件的完整原始来源。它已在https://www.google.com/webmasters/markup-tester/

验证

我正在使用 " reservationStatus":" http://schema.org/Confirmed" 这与Google文档中指定的一致。我最初使用状态" ReservationConfirmed"而不只是"确认"因为那是schema.org似乎使用的(他们没有“确认'”)。

但是没有' ReservationConfirmed'或者'确认'得到补充。

我已经添加了票证信息,TicketToken指向了正确的QR码。 我已经添加了#34;表演者" info(我,作为老师),这是Google EMail Markup Validator建议的内容。

我也通过向自己发送电子邮件(即从whines@gmail.com发送到whines@gmail.com)对此进行了测试,该电子邮件应该不需要将电子邮件列入白名单。

Delivered-To: whines@gmail.com
Received: by 10.107.197.133 with SMTP id v127csp1379143iof;
        Thu, 21 Dec 2017 10:53:10 -0800 (PST)
X-Google-Smtp-Source: ACJfBoszCK5Q3Br9bFDOI7ucImZ8NGhK8yMVSfgRYzXWXmUjnZqrdWeFZtfiZgGGBqNTLHO6E66y
X-Received: by 10.107.199.131 with SMTP id x125mr14553462iof.70.1513882390523;
        Thu, 21 Dec 2017 10:53:10 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1513882390; cv=none;
        d=google.com; s=arc-20160816;
        b=mB5G7WFlPlD0EJjxARc9/MRoHHqtadwu83hRH6c6nIddN/4vwoNR3ASv+zr/5ER9RU
         Ys70NMGAZodF0lkVU40jByhV7rGiKA5h61kcC+JK2iR8X3QBBA/qcpxYDtwITAkQrqNc
         1+HEJ+kM3zboFJo8P1tUJYjKuucIRC+iQm/cLGYahf00vgIY+qeMbPXGmrKWMCR0Nl2l
         DItwZy25XrI54wO0joGt5zj1Gmxk2vPWX4Z7Y3PJsqUzc9sEZzHE7W68Ul2XKNS65CYO
         vgWwYXNuDYXeRM8kUIiEg9WuPv/Azzdj6clMDcwGLkXW5B3k76p4gNzr2uB4F6uZHJqu
         5gqA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=charset:mime-version:to:subject:reply-to:from:dkim-signature
         :message-id:date:arc-authentication-results;
        bh=dg0XGyowjh3py1SdZvxdclmUyhBEczAui/9SQr8hI6w=;
        b=n6Ej7Hv7uLnf3K61YP/6JhTBsMs/1JpwwS5dL+4XDHKOfgWfdkJW6nUaKrtyQimhk9
         vAmaVzJmNn9KdHH+31SeTACGHsX4aMwD0cgttIeNFL/HLTmucNWuzyGHW2I2Vt4ppsWt
         UI3NDAsc1LgkVw7E/MGo+z3IwGabYK9QIUNIg29uC9GK72cPhFonKoYzB+z4LrjG94xm
         w4NcWLu/rtciQy21YoertS1ahvGy0kPlMmv71mc6hW1Jt1HiEvpThMQag9y4Is8t9go/
         nJjkQvTYfxDFk4y/k6GEa1gbvuUEOsjtFELLxK6gcnCruMeUr9HPOdRfC8RLIEFg0Zjj
         d8+Q==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@willhines.net header.s=default header.b=L6X46Jgh;
       spf=pass (google.com: domain of will@willhines.net designates 72.52.242.236 as permitted sender) smtp.mailfrom=will@willhines.net
Return-Path: <will@willhines.net>
Received: from rocket-mail.gnservers.com ([72.52.242.236])
        by mx.google.com with ESMTPS id v9si13875880iog.60.2017.12.21.10.53.10
        for <whines@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 21 Dec 2017 10:53:10 -0800 (PST)
Received-SPF: pass (google.com: domain of will@willhines.net designates 72.52.242.236 as permitted sender) client-ip=72.52.242.236;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@willhines.net header.s=default header.b=L6X46Jgh;
       spf=pass (google.com: domain of will@willhines.net designates 72.52.242.236 as permitted sender) smtp.mailfrom=will@willhines.net
Date: Thu, 21 Dec 2017 10:53:10 -0800 (PST)
Message-Id: <5a3c0316.09de6b0a.6ed26.bfe7SMTPIN_ADDED_MISSING@mx.google.com>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
    d=willhines.net; s=default; h=Content-Type:MIME-Version:To:Subject:Reply-To:
    From:Sender:Date:Message-ID:Cc:Content-Transfer-Encoding:Content-ID:
    Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
    :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
    List-Subscribe:List-Post:List-Owner:List-Archive;
    bh=dg0XGyowjh3py1SdZvxdclmUyhBEczAui/9SQr8hI6w=; b=L6X46Jgh23/qgj8FXWHGGxiPKD
    uYRAMfjpclaKE6Z6uWLHrdU2KWvyeqtYF+P4tFwp83oNWqOV9cOfc1NmzAgKkUXojH4ek02MW3HgX
    HP5jVNrlDuQfbQooA1HIMjAgSGlY5KONujfIpZiV9h0N0PhiqiWpdXtzjMebpTP1PR8WmVchEYFNh
    6Bbl+ZLfEFqugo9SFvQtQWdUqKd2h+eNT6+/WH3lf/nowNpnOS0PZcLCXrWFllmlwpkjc23LDAcyP
    UV9pizZtTqxbXpgCy2pEZUTYfX4aiqVJ5+E291QQlVLrl0YhCTOrXmD8nSntqXpABVRKB4QyWsdBq
    ZdJ93biA==;
Received: from static-205-185-62-122.earthlinkbusiness.net ([205.185.62.122]:60727 helo=localhost)
    by rocket.gnservers.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
    (Exim 4.89_1)
    (envelope-from <will@willhines.net>)
    id 1eS5xu-0007m4-0b
    for whines@gmail.com; Thu, 21 Dec 2017 13:53:10 -0500
From: will@willhines.net
Reply-To: will@willhines.net
Subject: ENROLLED: test - Mon Dec 25 - 11:00am-5pm
To: whines@gmail.com
MIME-Version: 1.0
Content-Type: text/html
charset: iso-8859-1
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - rocket.gnservers.com
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - willhines.net
X-Get-Message-Sender-Via: rocket.gnservers.com: authenticated_id: will@willhines.net
X-Authenticated-Sender: rocket.gnservers.com: will@willhines.net
X-Source: 
X-Source-Args: 
X-Source-Dir: 

<script type="application/ld+json">
 {
   "@context": "http://schema.org",
   "@type": "EventReservation",
   "reservationNumber": "wbhwk794",
    "reservationStatus": "http://schema.org/Confirmed",
   "underName": {
     "@type": "Person",
     "name": "Will Hines"
   },
   "reservationFor": {
     "@type": "EducationEvent",
     "name": "test",
     "startDate": "2017-12-25 11:00:00",
      "endDate": "2017-12-25 17:00:00",
     "performer": {
          "@type": "Person",
          "name": "Will Hines",
          "image": "http://willhines.net/home_files/wh_clay_med.jpg"
        },
     "location": {
       "@type": "Place",
       "name": "The Complex",
       "address": {
         "@type": "PostalAddress",
         "streetAddress": "6476 Santa Monica Blvd",
         "addressLocality": "Los Angeles",
         "addressRegion": "CA",
         "postalCode": "90038",
         "addressCountry": "US"
       }
     }
   },
    "ticketToken": "http://www.willhines.net/practices/code.php?wid=52&key=9ef66eb1f8166930&v=winfo",
    "ticketNumber": "1",
    "numSeats": "1",
   "modifiedTime": "2017-12-21 10:53:05",
   "modifyReservationUrl": "http://willhines.net/practices/index.php?wid=52"
 }
 </script>
<p>You are ENROLLED in test - Mon Dec 25 - 11:00am-5pm. </p>

<p>To DROP, click here:
http://localhost:8888/practices/index.php?key=9ef66eb1f8166930&ac=drop&wid=52<br><br>Pay in person or venmo. On the day of the workshop is fine.<br>Venmo link:
http://venmo.com/willhines?txn=pay&share=friends&amount=10&note=improv%20workshop</p>

<p>Full info:</p>

<p><b>Title:</b> test<br>
<b>When:</b> Mon Dec 25 - 11:00am-5pm<br>
<b>Where:</b> The Complex 6476 Santa Monica Blvd Los Angeles CA 90038<br>
<b>Cost:</b> 10</p>
<b>Description:</b> </p>






<p>Thanks!</p>

<p>-Will Hines<br>
HQ: 1948 Hillhurst Ave. Los Angeles, CA 90027</p>

1 个答案:

答案 0 :(得分:0)

如果有其他人遇到此问题,我已经解决了#34;它。轻微的架构错误,以及我必须向Google注册我的电子邮件。

1)当Google文档与schema.org上的内容不同时,请按照Google文档进行操作。对我而言,这意味着将reservationFor @type定义为&#34; Event&#34;不是&#34; EducationEvent&#34;

2)您需要按照此处所述的方式向Google注册您的电子邮件:Registering With Google

否则,测试只有在您通过script {google.com执行测试时才会有效,如Apps Script Quickstart中所述。

文档说你可以通过向同一地址发送电子邮件来回避注册测试,但我无法让它工作。

3)此外,这很明显,但我的PHP代码连接(通过PEAR&#39; s邮件)到我有帐户的SMTP服务器。这确保了我的电子邮件具有有效的DKIM / SPF信息。