Gmail 电子邮件标记不起作用
Gmail Email Markup not Working
我正在测试 Gmail 的 Email Markup functionality for Parcel Deliveries, and it seems I can't get it right. This is the e-mail content after sending an e-mail to myself:
Return-Path: <test.email@gmail.com>
Received: from my-pc.local ([my.ip.add.ress])
by mx.google.com with ESMTPSA id 68sm3737559qgz.8.2015.01.29.06.06.37
for <test.email@gmail.com>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 29 Jan 2015 06:06:38 -0800 (PST)
Date: Thu, 29 Jan 2015 11:06:33 -0300
From: "Test Name" <test.email@gmail.com>
To: test.email@gmail.com
Subject: Your package is on its way
Message-ID: <20150129140633.GA18059@my-pc.local>
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ParcelDelivery",
"deliveryAddress": {
"@type": "PostalAddress",
"streetAddress": "Test Address",
"addressLocality": "Test locality",
"addressRegion": "Test Region",
"addressCountry": "CL",
"postalCode": "7551234"
},
"expectedArrivalUntil": "2015-02-12T12:00:00-04:00",
"carrier": {
"@type": "Organization",
"name": "Test org"
},
"itemShipped": {
"@type": "Product",
"name": "iPod Mini"
},
"partOfOrder": {
"@type": "Order",
"orderNumber": "176057",
"merchant": {
"@type": "Organization",
"name": "Test Org 2"
},
"orderStatus": "OrderInTransit"
},
"trackingUrl": "http://track.com/track/1234567890",
"trackingNumber": "1234567890"
}
</script>
<p>Test paragraph</p>
</body>
</html>
标记根据 markup validator 有效。我缺少推荐的(但不是必需的)字段。添加它们没有帮助。
到目前为止我也尝试过微数据格式,但没有成功:
<html>
<body>
<div itemscope itemtype="http://schema.org/ParcelDelivery">
<div itemprop="deliveryAddress" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="streetAddress" content="Test Address"/>
<meta itemprop="addressLocality" content="San Francisco"/>
<meta itemprop="addressRegion" content="CA"/>
<meta itemprop="addressCountry" content="US"/>
<meta itemprop="postalCode" content="94107"/>
</div>
<meta itemprop="expectedArrivalUntil" content="2015-01-12T12:00:00-08:00"/>
<div itemprop="carrier" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Test Carrier"/>
</div>
<div itemprop="itemShipped" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="iPod Mini"/>
</div>
<div itemprop="partOfOrder" itemscope itemtype="http://schema.org/Order">
<meta itemprop="orderNumber" content="176057"/>
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Bob Dole"/>
</div>
<meta itemprop="orderStatus" content="OrderInTransit"/>
</div>
<meta itemprop="trackingUrl" content="http://track.com/track/1234567890"/>
<meta itemprop="trackingNumber" content="1234567890"/>
</div>
<p>Test paragraph</p>
</body>
</html>
我错过了什么?
我正在使用 mutt 发送电子邮件:
mutt -e "set content_type=text/html" test.email@gmail.com -s "Your package is on its way" < test.html
或没有内容类型:
mutt test.email@gmail.com -s "Your package is on its way" < test.html
标记看起来不错。不过,您需要使用 DKIM 或 SPF 验证您的邮件(参见 https://developers.google.com/gmail/markup/registering-with-google#email_sender_quality_guidelines)。实现此目的的最简单方法是使用 Gmails SMTP 服务器而不是您自己的服务器。
如果您使用 Google SMTP 中继,则必须使用如下所示的 SPF 记录:
600 IN TXT "v=spf1 a include:_spf.google.com ~all"
我正在测试 Gmail 的 Email Markup functionality for Parcel Deliveries, and it seems I can't get it right. This is the e-mail content after sending an e-mail to myself:
Return-Path: <test.email@gmail.com>
Received: from my-pc.local ([my.ip.add.ress])
by mx.google.com with ESMTPSA id 68sm3737559qgz.8.2015.01.29.06.06.37
for <test.email@gmail.com>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Thu, 29 Jan 2015 06:06:38 -0800 (PST)
Date: Thu, 29 Jan 2015 11:06:33 -0300
From: "Test Name" <test.email@gmail.com>
To: test.email@gmail.com
Subject: Your package is on its way
Message-ID: <20150129140633.GA18059@my-pc.local>
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ParcelDelivery",
"deliveryAddress": {
"@type": "PostalAddress",
"streetAddress": "Test Address",
"addressLocality": "Test locality",
"addressRegion": "Test Region",
"addressCountry": "CL",
"postalCode": "7551234"
},
"expectedArrivalUntil": "2015-02-12T12:00:00-04:00",
"carrier": {
"@type": "Organization",
"name": "Test org"
},
"itemShipped": {
"@type": "Product",
"name": "iPod Mini"
},
"partOfOrder": {
"@type": "Order",
"orderNumber": "176057",
"merchant": {
"@type": "Organization",
"name": "Test Org 2"
},
"orderStatus": "OrderInTransit"
},
"trackingUrl": "http://track.com/track/1234567890",
"trackingNumber": "1234567890"
}
</script>
<p>Test paragraph</p>
</body>
</html>
标记根据 markup validator 有效。我缺少推荐的(但不是必需的)字段。添加它们没有帮助。
到目前为止我也尝试过微数据格式,但没有成功:
<html>
<body>
<div itemscope itemtype="http://schema.org/ParcelDelivery">
<div itemprop="deliveryAddress" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="streetAddress" content="Test Address"/>
<meta itemprop="addressLocality" content="San Francisco"/>
<meta itemprop="addressRegion" content="CA"/>
<meta itemprop="addressCountry" content="US"/>
<meta itemprop="postalCode" content="94107"/>
</div>
<meta itemprop="expectedArrivalUntil" content="2015-01-12T12:00:00-08:00"/>
<div itemprop="carrier" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Test Carrier"/>
</div>
<div itemprop="itemShipped" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="iPod Mini"/>
</div>
<div itemprop="partOfOrder" itemscope itemtype="http://schema.org/Order">
<meta itemprop="orderNumber" content="176057"/>
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Bob Dole"/>
</div>
<meta itemprop="orderStatus" content="OrderInTransit"/>
</div>
<meta itemprop="trackingUrl" content="http://track.com/track/1234567890"/>
<meta itemprop="trackingNumber" content="1234567890"/>
</div>
<p>Test paragraph</p>
</body>
</html>
我错过了什么?
我正在使用 mutt 发送电子邮件:
mutt -e "set content_type=text/html" test.email@gmail.com -s "Your package is on its way" < test.html
或没有内容类型:
mutt test.email@gmail.com -s "Your package is on its way" < test.html
标记看起来不错。不过,您需要使用 DKIM 或 SPF 验证您的邮件(参见 https://developers.google.com/gmail/markup/registering-with-google#email_sender_quality_guidelines)。实现此目的的最简单方法是使用 Gmails SMTP 服务器而不是您自己的服务器。
如果您使用 Google SMTP 中继,则必须使用如下所示的 SPF 记录:
600 IN TXT "v=spf1 a include:_spf.google.com ~all"