Google(收件箱,gmail,现在)无法识别EventReservation

时间:2016-03-26 08:43:52

标签: schema.org json-ld google-schemas google-now

我将EventReservation JSON-LD添加到电子邮件中(使用Chrome扩展程序中的gmail API将从我发送给我)。

它已成功发送到我的收件箱,但谷歌并未将此识别为事件。这是来自交付电子邮件的电子邮件正文转储(HTML部分由谷歌结构化数据测试工具和yandex结构化数据验证器成功验证,实际上json是从我的收件箱中解析的真实事件中复制粘贴的,因此脚本应该是好的):

Received: from 236444161893
    named unknown
    by gmailapi.google.com
    with HTTPREST;
    Sat, 26 Mar 2016 07:34:52 -0400
From: XXXXXXX@gmail.com
To: XXXXXXX@gmail.com
Subject: Lets Celebrate !
Content-Type: text/html; charset="utf-8"
Date: Sat, 26 Mar 2016 07:34:52 -0400
Message-Id: <CAEY7X7rQZFQTmYqyH-UEMt5KR3bwbC5D-KhT3Rv8vKixVrGkFA@mail.gmail.com>


<html>
    <head>
        <title>Sample Title</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
        <script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "EventReservation",
    "reservationNumber": "123123123",
    "underName": {
        "@type": "Person",
        "name": "John Smith"
    },
    "reservationStatus": "http://schema.org/Confirmed",
    "reservationFor": {
        "@type": "Event",
        "name": "ProductCamp Helsinki 2016",
        "startDate": "2016-04-09T10:00:00+03:00",
        "endDate": "2016-04-09T16:00:00+03:00",
        "location": {
            "@type": "Place",
            "name": "OP Headquarters",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": "Teollisuuskatu 1E00510 Helsinki",
                "addressLocality": "Helsinki",
                "addressRegion": "",
                "postalCode": "00510",
                "addressCountry": "FI"
            }
        }
    }
}
        </script>
        <b>I did it!</b>
    </body>
</html>

EventReservation Email in my Inbox

可能出现什么问题?

更新:当我通过script.google.com(MailApp.sendEmail)发送时,此HTML工作并由Inbox解析,但如果从Chrome发送,则无法正常工作使用gmail API扩展(POST https://www.googleapis.com/gmail/v1/users/me/messages/send)。所以看起来电子邮件标题有问题。例如。 &#34;正确&#34;从script.google.com发送的电子邮件包含DKIM-Signature等:

Delivered-To: XXXXXXX@gmail.com
Received: by 10.31.52.16 with SMTP id b16csp631299vka;
        Sat, 26 Mar 2016 05:40:04 -0700 (PDT)
X-Received: by 10.31.58.139 with SMTP id h133mr9599567vka.158.1458996004694;
        Sat, 26 Mar 2016 05:40:04 -0700 (PDT)
Return-Path: <3JIP2VgkJCcEiluklyzwinthps.jvtiluklyzwinthps.jvt@maestro.bounces.google.com>
Received: from mail-vk0-x245.google.com (mail-vk0-x245.google.com. [2607:f8b0:400c:c05::245])
        by mx.google.com with ESMTPS id g188si4468255vkf.94.2016.03.26.05.40.04
        for <XXXXXXX@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 26 Mar 2016 05:40:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of 3JIP2VgkJCcEiluklyzwinthps.jvtiluklyzwinthps.jvt@maestro.bounces.google.com designates 2607:f8b0:400c:c05::245 as permitted sender) client-ip=2607:f8b0:400c:c05::245;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@gmail.com;
       spf=pass (google.com: domain of 3JIP2VgkJCcEiluklyzwinthps.jvtiluklyzwinthps.jvt@maestro.bounces.google.com designates 2607:f8b0:400c:c05::245 as permitted sender) smtp.mailfrom=3JIP2VgkJCcEiluklyzwinthps.jvtiluklyzwinthps.jvt@maestro.bounces.google.com;
       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Received: by mail-vk0-x245.google.com with SMTP id e6so159765935vkh.0
        for <XXXXXXX@gmail.com>; Sat, 26 Mar 2016 05:40:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:message-id:date:subject:from:to;
        bh=AcafBmWjtt8pobLyfk/O93P08+xv/A6AO4gP7r6A0pI=;
        b=ZXfhpJnohG6skmBxr4JFYf/743Sy7ckO7PnyUBXytwPNwh3GoULK+LJAyXloqt4hBs
         7aoKDtuFsr4o2Q2Q+fexqw3qY8QheK/FG7Mr2lVAfVMDg56tumRIp27B4XmaNyL96S3k
         i35hR5B5trQKU/qFENnXCQc5LjFdDLUADzbrs6VMHLZW8I/73Yq7+/JDkHeMmIZMAboz
         KN8qyWaFZSJvMGg3NTkurkpBE5oJ6KxCN6cjZKLoUFfbPaqa9cdc0c7w4+fNFK0DzjPT
         ESsDEpxS9K/1ZL70xYpUmrBzaIhoOehRfpZRc+P4gXAaPvo36PC1ZJjmgzRD6etHJKSM
         VB2w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:message-id:date:subject:from:to;
        bh=AcafBmWjtt8pobLyfk/O93P08+xv/A6AO4gP7r6A0pI=;
        b=gB2OQWkIc7u6mfjc5l9T6umyFBasInqetcEHqQcXbuymmKS5DpqDE8MwYpI62OmVWV
         gqrP3E+lf43acVMjslMWQUXuXJQctZMEKkehiN7eA2QeUQd35vWKpjXpuFRBHHLIcin2
         XNC8WqwF95XGITPKI9kG78XhdS8h+BVmxVws/rRUA7yqgP/gALPZzeks70Q1p6dh1zkj
         Z88ucz2OeOM55EiFha6gKbuLr+0RfZDsquopvxipJjaJhHkcdLqW9xfLf/kgSvD9PdiL
         NMJYsnIcgLZ02VtV0RjgK0+/9M/SPtB28nncx8wqP0Z2/fY1MiH+uWMmaH3lvNmgoTLQ
         3dIQ==
X-Gm-Message-State: AD7BkJLZUbRwOBaDX4rnT/kKOc5n3NPdUn4PbtoJeh45PKy3qlm7fE9kOBBa5YLgCLErp694wJeXHnGj7LiR2Q==
MIME-Version: 1.0
X-Received: by 10.31.11.75 with SMTP id 72mr11424050vkl.2.1458996004582; Sat,
 26 Mar 2016 05:40:04 -0700 (PDT)
Message-ID: <001a1146937894fe1e052ef2fa6a@google.com>
Date: Sat, 26 Mar 2016 12:40:04 +0000
Subject: Test Email markup - Sat Mar 26 2016 15:40:04 GMT+0300 (EAT)
From: XXXXXXX@gmail.com
To: XXXXXXX@gmail.com
Content-Type: multipart/alternative; boundary=001a1146937894fe08052ef2fa67

--001a1146937894fe08052ef2fa67
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

I did it!

--001a1146937894fe08052ef2fa67
Content-Type: text/html; charset=ISO-8859-1

<html>
    <head>
        <title>Sample Title</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    </head>
    <body>
        <script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "EventReservation",
    "reservationNumber": "1231231234",
    "underName": {
        "@type": "Person",
        "name": "John Smith"
    },
    "reservationStatus": "http://schema.org/Confirmed",
    "reservationFor": {
        "@type": "Event",
        "name": "ProductCamp Helsinki 2016",
        "startDate": "2016-04-09T10:00:00+03:00",
        "endDate": "2016-04-09T16:00:00+03:00",
        "location": {
            "@type": "Place",
            "name": "OP Headquarters",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": "Teollisuuskatu 1E00510 Helsinki",
                "addressLocality": "Helsinki",
                "addressRegion": "",
                "postalCode": "00510",
                "addressCountry": "FI"
            }
        }
    }
}
        </script>
        <b>I did it!</b>
    </body>
</html>
--001a1146937894fe08052ef2fa67--

1 个答案:

答案 0 :(得分:2)

我尝试做同样的事情(and asked a similar question)并得出结论,问题是Inbox ignores structured data unless the email is authenticated using DKIM(以减少垃圾邮件)。我无法确定如何使用Gmail API启用身份验证,因此我选择使用Google Apps脚本功能MailApp.sendEmail(),因为它会发送经过身份验证的电子邮件。