使用 Mailgun 发送 AMP 电子邮件

问题描述 投票:0回答:1

大家好,感谢您抽出时间查看我的问题。对于初学者来说,我的 AMP 标记在 Playground 中以及从 Playground 发送到我的 Gmail 时都可以很好地验证和渲染。

但是当我使用 mailgun 并使用 mailgun 模板发送 amp 电子邮件时,我对 php 版本的 sendMessage() 中的

amp-html
参数内部的内容感到困惑 -
'amp-html' => '<!doctype html><html ⚡4email><head>...
mailgun 发送电子邮件,但带有一条错误消息,指出 INVALID_AMP,但我应该将 AMP 放在哪里:)

<!doctype html>
<html ⚡4email>
<head>
  <meta charset="utf-8">
  <script async src="https://cdn.ampproject.org/v0.js"></script>
  <style amp4email-boilerplate>body{visibility:hidden}</style>
</head>
<body>
  Hello, AMP4EMAIL world.
</body>
</html>

以上面的代码为例,该代码的哪一部分进入 mailgun 中 sendMessage() 调用的 amp-html 参数?

我不确定要在 amp-html 参数中放入什么 - mailgun 文档只是说将消息的 AMP 部分放在那里 - 但这是什么意思 -

<doctype>
<head>
它们包含在内吗?

amp-html amp-email
1个回答
0
投票

我很难使用 Mailgun 发送 AMP 电子邮件。我按照文档进行操作,它建议将 AMP 代码放在“amp-html”参数中。这对我不起作用。我必须将我的 AMP 代码放在“html”参数中。

我希望您觉得这有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.