Sending AMP Emails On Netcore – All You Need To Know (Part 2)
Written by
Netcore Cloud
admin
0

Subscribe for updates

Sending AMP Emails On Netcore – All You Need To Know (Part 2)

Published : July 2, 2020

In the first part of sending amp emails on Netcore, you learned about what is AMP in Email Technology and if you are a brand, how you can start sending AMP mails via Netcore. This involves registering your domain with Google by testing an AMP ready email.

You also learned details on how to create the HTML for AMP Emails and how to include dynamic images and links in them.

In this part, you’ll learn:

  • The MIME format necessary to create an AMP email
  • How to validate your content before sending and about the injection of these emails via Pepipost.
  • The metrics for engagement and how it will be tracked. 
  • How you can test the mails via Pepipost UI.

MIME format

It is recommended to have three types of HTML in your MIME structure:

  • Text / plain
  • Text / x-amp-HTML
  • Text/HTML

When a user replies to or forwards an AMP email, the system strips off the x-amp-HTML part, delivering only the text/HTML content. This is why it is important to create text/HTML part as well so as to send a static HTML if AMP email is not delivered.

Additionally, some email clients render only the last part of MIME, meaning they deliver the text/HTML part instead of x-amp-HTML.

The width of the content should be less than 800 pixels and a minimum of 3-4 scrolls for length. This is to avoid any cropping from ISPs.

Content Validation

This is a web-based validator where you can paste your finished AMP HTML code and test for any errors. This tool will show you all the inline validation errors.

You can find the validator here.

Testing AMP Emails on Gmail

To test the final AMP emails on your Gmail address, ensure you enable the dynamic settings on Gmail.

As shown in the figure below, go on settings of your Gmail account and enable the checkbox against Dynamic Email by giving permission to Google to display dynamic emails in your mailbox.

Now you can test your finished AMP Emails to your Gmail id and test for its content!

Injection of AMP emails to Netcore

The AMP HTML content is to be sent in the tour email. You can use attributes to display dynamic values such as name, age as [%NAME%], [%AGE%]], etc.

Make sure you have added HTML in the content parameter which will be rendered in case AMP HTML does not work on a given client.

“personalizations”: [ 

   { 

“recipient”: “[email protected]”, 

“attributes”: { 

“NAME”: “Mike”, 

“ACCOUNT_BAL”: “100” 

}, 

“x-apiheader_cc”: “ABDXYZ123”, 

“x-apiheader”: “ABCDXYZ123”, 

“recipient_cc”: [ 

[email protected]”, 

[email protected]” 

   } 

], 

“tags”: “laborum deserunt proiden”, 

“from”: { 

“fromEmail”: “[email protected]”, 

“fromName”: “imfalconideuser” 

}, 

“subject”: “Welcome to Pepipost”, 

“content”: “Hi,[%NAME%] this is my first trial mail”,

“ampcontent”: “<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>”,

“templateId”: 7766, 

“attachments”: [ 

   { 

“fileContent”: “your base file content is base64 encoded”, 

“fileName”: “Myfilename.txt” 

   } 

], 

“settings”: 

“footer”: 1, 

“clicktrack”: 0, 

“opentrack”: 1, 

“unsubscribe”: 0, 

“bcc”: “[email protected]” 

}, 

“replyToId”: “[email protected]” 

}

As such being a delivery Engine, which works on SMTP based injection, there will be no testing done via Netcore UI.

In order to send an email using Netcore’s API, you should be ready with all the

below prerequisites mentioned this documentation:

Step 1: Build Your API Call

Your API call must have the following components:

  • An Endpoint: Use https://api.pepipost.com/v2/ or select the one from the
  • which best meets your requirement.
  • An API Key within the
  • header.
  • A valid Request method. When submitting data to a resource use a valid allowed request method like POST, PUT, GET, PATCH and DELETE.
  • A valid payload. You must submit your payload in JSON format only.

Once you’re ready with the above components, follow the next steps.

Step 2: Send Your Email Using The API

Using the cURL Method

Warning: Some samples are using curl utility for API examples. UNIX shells require that some characters must be escaped, for example, $ becomes $. If your API key contains unescaped characters you may receive HTTP error 401 (Unauthorized).

  1. Copy the below cURL example:

curl –request POST \

–url https://api.pepipost.com/v2/sendEmail \

–header ‘api_key: <YOUR_API_KEY>’ \

–header ‘content-type: application/json’ \

–data ‘{“personalizations”:[{“recipient”:”[email protected]”,”attributes”:{“NAME”:”Steve”}}],”tags”:”OrderConfirmationEmail”,”from”:{“fromEmail”:”[email protected]”,”fromName”:”ABC Sales”},”subject”:”Your Order is confirmed”,”content”:”Hi,[%NAME%] this is my first test email”}’

  1. Paste the curl call into your favorite text editor.
  2. Copy your API key and paste it in the api_key header.
  3. In the data section, specify the recipient and from email addresses.

From/Sender address consists of the Sender domain, which needs to be

on Pepipost prior to initiate a test.

  1. Copy the code and paste it in your terminal.
  2. Hit Enter.
  3. Check the recipient’s inbox. You must have received the email.

The API documentation to make the SMTP API call to inject mails via Pepipost is provided in the below link: https://developers.pepipost.com/email-api/email-api/sendemail

Engagement metrics to be tracked

Following Open and Clicks metrics are to be tracked-

Opens:

A 1-pixel image will be added inserted the XHTML code to ensure that we are tracking the opens for the emails.

Clicks:

Currently, the click tracking is under the testing phase and there will be an update on it, from the Pepipost development team soon. 

Once the click tracking has been enabled the add-to-cart sessions depend on a centralized JSON id which will be tracked on the website as well by Google.

As a result, if a user does an add-to-cart session on the email client and wishes to check out the product on the website, the same session id will be tracked on the website as well. So, the user will be able to see the same product on the website in the add-to-cart section.

Here is the documentation on how Pepipost collects opens and clicks stats for panels:https://developers.pepipost.com/email-api/events-api/get-stats

Now you are ready to test your AMP Emails through Netcore!

Unlock unmatched customer experiences,
get started now
Let us show you what's possible with Netcore.