简体   繁体   English

测试Gmail架构失败

[英]Testing Gmail Schemas Fails

I'm trying to test Gmail Schemas where the sender and the recipient are the same(mine) account following the Self Testing Notes 我正在尝试测试Gmail模式 ,其中发件人和收件人是自我测试说明后的相同(我的)帐户

You can easily test if your markup is working correctly end-to-end by sending emails with schemas to your Gmail account. 您可以通过向Gmail帐户发送带有架构的电子邮件轻松测试您的标记是否正常工作。 All emails where the sender and the recipient are the same account ignore the registration requirements and can be used for self-testing. 发件人和收件人是同一帐户的所有电子邮件都会忽略注册要求,并可用于自我测试。

but without the expected result, the "Action" button is not displayed. 但如果没有预期的结果,则不会显示“操作”按钮。

I have tried using both the JSON-LD and Microdata without results. 我尝试过使用JSON-LD和Microdata而没有结果。

Here the "Show original" of the email from my Gmail Account: 这是我的Gmail帐户中电子邮件的“显示原件”:

Return-Path: <fake-account-email-x@gmail.com>
Received: *****
Message-ID: <fake-email-id@gmail.com>
Date: Tue, 12 Nov 2013 09:41:53 +0100
From: Cristian <fake-account-email-x@gmail.com>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5
MIME-Version: 1.0
To: fake-account-email-x@gmail.com
Subject: test
Content-Type: multipart/alternative;
 boundary="------------090703050903040805020509"

This is a multi-part message in MIME format.
--------------090703050903040805020509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


  Ciao ${FIRSTNAME}$

  * punto 1
  * punto 2
  * punto 3


--------------090703050903040805020509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div itemscope="" itemtype="http://schema.org/EmailMessage">
      <meta itemprop="description" content="Approval request for John's
        $10.13 expense for office supplies">
      <div itemprop="action" itemscope=""
        itemtype="http://schema.org/ConfirmAction">
        <meta itemprop="name" content="Approve Registration">
        <div itemprop="handler" itemscope=""
          itemtype="http://schema.org/HttpActionHandler">
          <link itemprop="url" href="http://www.example.com/">
        </div>
      </div>
    </div>
    <h1>Ciao ${FIRSTNAME}$</h1>
    <ul>
      <li>punto 1</li>
      <li>punto 2</li>
      <li>punto 3</li>
    </ul>
  </body>
</html>

--------------090703050903040805020509--

And here how it appears from the list: 在这里它是如何从列表中出现的:

在此输入图像描述

And inside the message: 在消息里面:

在此输入图像描述

I have also validated my code via the Markup Tester 我还通过Markup Tester验证了我的代码

Where is the error in my test? 我的测试中的错误在哪里? I can't figure out :( 我想不通:(

UPDATE 20131113 更新20131113

Sending the email via Test Gmail Schemas , as suggested Devnook, all works fine, but using my Thunderbird client(using my account via SMTP) nope. 通过测试Gmail架构发送电子邮件,如Devnook建议,一切正常,但使用我的Thunderbird客户端(通过SMTP使用我的帐户)nope。

Here the source from the test via "Test Gmail Schema" 这里通过“测试Gmail架构”测试的来源

Delivered-To: fake-account-email-x@gmail.com
Received: by 10.224.58.135 with SMTP id g7csp190326qah;
        Tue, 12 Nov 2013 22:48:43 -0800 (PST)
X-Google-DKIM-Signature: *********
X-Original-Authentication-Results: ********
Return-Path: <3yyCDUg0JErIYeSad-SUlagfkYeSad.UgeUjaklaSf.hgjlS.UjpYeSad.Uge@2UIX4H7XYGSZ66WEERLQ.apphosting.bounces.google.com>
Received-SPF: pass ********
Authentication-Results: mr.google.com;
       spf=pass ********
X-Received: from mr.google.com ([10.224.24.65])
        by 10.224.24.65 with SMTP id u1mr35599473qab.6.1384325323511 (num_hops = 1);
        Tue, 12 Nov 2013 22:48:43 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.224.24.65 with SMTP id u1mr25556165qab.6.1384325323474; Tue,
 12 Nov 2013 22:48:43 -0800 (PST)
X-Google-Appengine-App-Id: s~gmail-actions
X-Google-Appengine-App-Id-Alias: gmail-actions
Message-ID: <fake-email-id@google.com>
Date: Wed, 13 Nov 2013 06:48:43 +0000
Subject: Testing Gmail Actions 2013-11-13 06:48
From: fake-account-email-x@gmail.com
To: fake-account-email-x@gmail.com
Content-Type: multipart/alternative; boundary=001a11c2c63a28cf0504eb095b6e

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

Ciao ${FIRSTNAME}$


punto 1
punto 2
punto 3

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

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div itemscope="" itemtype="http://schema.org/EmailMessage">
      <meta itemprop="description" content="Approval request for John's
        $10.13 expense for office supplies">
      <div itemprop="action" itemscope=""
        itemtype="http://schema.org/ConfirmAction">
        <meta itemprop="name" content="Approve Registration">
        <div itemprop="handler" itemscope=""
          itemtype="http://schema.org/HttpActionHandler">
          <link itemprop="url" href="http://www.example.com/">
        </div>
      </div>
    </div>
    <h1>Ciao ${FIRSTNAME}$</h1>
    <ul>
      <li>punto 1</li>
      <li>punto 2</li>
      <li>punto 3</li>
    </ul>
  </body>
</html>
--001a11c2c63a28cf0504eb095b6e--

The "big" difference are that the headers of this email contains the DKIM-Signature and SPF but in theory emails where the sender and the recipient are the same account ignore the registration requirements “大”的区别在于此电子邮件的标题包含DKIM签名和SPF,但理论上emails where the sender and the recipient are the same account ignore the registration requirements

Here how it appear the "correct" email 它是如何出现“正确”的电子邮件

在此输入图像描述

I tested your email (sent it to myself using http://gmail-actions.appspot.com/ ) and I got the action appearing in my inbox. 我测试了你的电子邮件(使用http://gmail-actions.appspot.com/发送给我自己),我的动作出现在我的收件箱中。 So your markup is fine... Are you sure you are not forwarding your email to another account? 所以你的标记很好......你确定你没有将你的电子邮件转发到另一个帐户吗?

Maybe try if other sample emails from gmail-actions.appspot.com work. 也许尝试来自gmail-actions.appspot.com的其他示例电子邮件。 If not, maybe you have some lab enabled in your inbox or a theme that is blocking the button to appear? 如果没有,也许您的收件箱中启用了一些实验室或阻止按钮出现的主题?

Also, this works only on a desktop afaik. 此外,这仅适用于桌面afaik。

When I attempt to DKIM sign the message myself, checkmyauth@auth.returnpath.net returns: 当我尝试DKIM自己签署消息时,checkmyauth @ auth.returnpath.net返回:

WARNING: The From domain 'gmail.com' does NOT match the DKIM domain

and gmail omits the headers (and my email remains unsigned). 并且gmail省略了标题(我的电子邮件仍然是未签名的)。

Yahoo says DKIM passed by the way. 雅虎称DKIM顺便过去了。

This sucks, no way to programatically test gmail actions if self signed emails to self are considered spam. 这很糟糕,如果自签名的电子邮件被认为是垃圾邮件,则无法以编程方式测试Gmail操作。

Mirza 米尔扎

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM