我正在尝试amp4email,但无法正常工作。
这是我的Gmail中的样子:
我关注了这篇文章:https://www.ampproject.org/docs/interaction_dynamic/amp-email-format
如果我在Gmail中查看“原始邮件”,则外观如下:
Return-Path: <myemail@gmail.com>
Received: from localhost.localdomain ([80.234.101.191])
by smtp.gmail.com with ESMTPSA id z15sm3123981ljz.55.2019.03.28.01.27.34
for <myemail@gmail.com>
(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
Thu, 28 Mar 2019 01:27:34 -0700 (PDT)
Date: Thu, 28 Mar 2019 12:27:41 +0400
From: myemail@gmail.com
To: myemail@gmail.com
Message-ID: <5c9c857d5cfb0_a8083fccaec32e6c860ab@Dmitrys-MacBook-Pro-2.local.mail>
Subject: Test email from Dmitry
Mime-Version: 1.0
Content-Type: text/x-amp-html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!doctype html>
<html amp4email>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom>
.red { background-color: red; }
.blue { background-color: blue; }
.yellow { background-color: yellow; }
</style>
</head>
<body>
<p [class]="state.color" class="yellow" [text]="'The current color is ' + state.color + '.'">
The current color is yellow
</p>
<button on="tap:AMP.setState({state: {color: 'red'}})">
Set color to red
</button>
<button on="tap:AMP.setState({state: {color: 'blue'}})">
Set color to blue
</button>
</body>
</html>
p.s。我已经删除了我的真实电子邮件。
答案 0 :(得分:0)
我正在测试相同内容,并且也遇到了麻烦-我看不到启用动态电子邮件的设置。您设置好了吗?还是您也错过了它? 根据{{3}},您需要:
导航至Gmail设置>常规>动态电子邮件,然后单击动态 电子邮件开发。这将打开一个对话框,您可以在其中将电子邮件列入白名单 可以向您发送动态电子邮件以进行测试的地址。