Send AMP-EMAIL Using Mailgun

186 Views Asked by At

Hello Everyone thank you for taking time to look at my question. For starters my AMP markup validates and renders just fine in the playground and when sent to my gmail from the playground.

But when I am sending an amp email using mailgun and using a mailgun template, I am confused as to what goes inside of the amp-html parameter in the php version of sendMessage() - the 'amp-html' => '<!doctype html><html ⚡4email><head>... mailgun sends the email but with an error message saying the INVALID_AMP but where to I put my 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>

Using the above code as example what part of this code goes into the amp-html parameter of the sendMessage() call in mailgun?

I am not sure what to put inside the amp-html param - the mailgun docs just say put the AMP part of the message in there - but what does that mean - the <doctype> the <head> are they included?

0

There are 0 best solutions below