This API enables developers to preview how HTML emails will render across different email clients and devices. The aim is to eliminate the guesswork and ensure that emails look as intended, no matter where they’re viewed. Additionally, the repository includes a VS Code extension for seamless integration into your development environment.
Use this tool to streamline your email testing process and maintain consistency and professionalism in your email communications.
Press CTRL + Shift + P
Choose the command to run
---> Set API Key ( you need to set this first - Get one here )
---> Show Preview
Display the preview directly in VS Code ( Get the Extension )
You can also use our API to get the preview, is as simple as using cURL
curl -X GET https://emailpreview.h501.io/devices \
-H "Content-Type: application/json" \
-H "X-API-KEY: 1234567890"
return [{
"name":"AOL Standard",
"category":"WEB",
"deviceKey":"aol_basic"
}]
curl -X POST https://emailpreview.h501.io/sendPreview \
-H "Content-Type: application/json" \
-H "X-API-KEY: 1234567890" \
-d '{"htmlBody":"<h2>Your HTML goes here</h2>","emailSubject":"Some cool stuff","devices":["microsoft_outlook_2016"]}'
return [{
"deviceKey":"aol_basic",
"newImageUrl":"https://emailpreview.h501.io/files/qj123zxxzkj342f.jpg"
}]Note: You could theoretically send more than one device at once, this is supported but it is possible the request will timeout. Work in progress for this. I suggest to choose one device at time until I get it right.
The preview is a full render simulation of how the HTML code would look like across different devices/simulation. The fidelty is 100% becuase every preview is actually rendered on the desired device/client.
You can find the complete list of devices/clients here
You need to get an API key at https://emailpreview.h501.io/
Possibility to run multiple preview at once from the VS Code extension
Initial release of HTML Email Preview
Enjoy!

