<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ketevan  </title>
    <description>The latest articles on Forem by Ketevan   (@ketbostoganashvili).</description>
    <link>https://forem.com/ketbostoganashvili</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1187260%2F841e25df-15f6-4ef3-a961-e0819e02fc2d.jpg</url>
      <title>Forem: Ketevan  </title>
      <link>https://forem.com/ketbostoganashvili</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ketbostoganashvili"/>
    <language>en</language>
    <item>
      <title>Send emails with Vercel and Mailtrap</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Tue, 02 Sep 2025 13:09:41 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/send-emails-with-vercel-and-mailtrap-3m57</link>
      <guid>https://forem.com/ketbostoganashvili/send-emails-with-vercel-and-mailtrap-3m57</guid>
      <description>&lt;p&gt;Learn how to integrate Mailtrap with your Vercel-hosted applications to send transactional emails with reliable delivery and comprehensive analytics.&lt;/p&gt;

&lt;p&gt;This article is based on Mailtrap's official tutorial on &lt;a href="https://help.mailtrap.io/article/186-send-email-in-vercel" rel="noopener noreferrer"&gt;how to send email in Vercel&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before we start
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Required accounts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Vercel account - to host your applications and manage environment variables&lt;/li&gt;
&lt;li&gt;Mailtrap account - to send emails with high deliverability rates&lt;/li&gt;
&lt;li&gt;Next.js project - to implement the email functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Prerequisites setup
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Verify your email sending domain - Mailtrap allows you to send emails only from a verified domain. Follow &lt;a href="https://help.mailtrap.io/article/69-sending-domain-setup" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; to set up domain verification.&lt;/li&gt;
&lt;li&gt;Get your &lt;a href="https://mailtrap.io/api-tokens" rel="noopener noreferrer"&gt;API token&lt;/a&gt; - Ensure your API Token has admin access level to your domain and email sending capabilities.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Set up Mailtrap
&lt;/h3&gt;

&lt;p&gt;Navigate to your Mailtrap dashboard and locate your API credentials:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on Settings → API Tokens&lt;/li&gt;
&lt;li&gt;Review all active tokens, their creators, and access levels&lt;/li&gt;
&lt;li&gt;If you don't have an API key, click Add Token&lt;/li&gt;
&lt;li&gt;Assign the desired permissions (check API/SMTP permissions)&lt;/li&gt;
&lt;li&gt;Click Save and store your API key securely&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note that you won't be able to see the API key again after creation. For more detailed information, refer to the &lt;a href="https://help.mailtrap.io/article/103-api-tokens" rel="noopener noreferrer"&gt;Mailtrap API Tokens guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create a Next.js function
&lt;/h3&gt;

&lt;p&gt;Create a new API route in your Next.js application to handle email sending via Mailtrap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/api/send/route.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MAILTRAP_API_TOKEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MAILTRAP_API_TOKEN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://send.api.mailtrap.io/api/send&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;MAILTRAP_API_TOKEN&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;no-reply@yourdomain.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;support@yourdomain.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
      &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello from Vercel + Mailtrap&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is a test email sent via Mailtrap API.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failed to send email&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Deploy on Vercel
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Add your Mailtrap API key to Vercel
&lt;/h4&gt;

&lt;p&gt;Configure your environment variables in the Vercel dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your Vercel dashboard&lt;/li&gt;
&lt;li&gt;Navigate to the Settings for your target project&lt;/li&gt;
&lt;li&gt;Find the Environment Variables section&lt;/li&gt;
&lt;li&gt;Add a new variable:

&lt;ul&gt;
&lt;li&gt;Key: MAILTRAP_API_TOKEN&lt;/li&gt;
&lt;li&gt;Value: Your actual Mailtrap API token&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click Save&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: Vercel environment variables only become available after redeployment. Make sure to either push a new commit or click Deploy again in the Vercel dashboard.&lt;/p&gt;

&lt;h4&gt;
  
  
  Deploy your application
&lt;/h4&gt;

&lt;p&gt;Deploy your application to Vercel using one of these methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Git integration (recommended):

&lt;ul&gt;
&lt;li&gt;Connect your repository to Vercel&lt;/li&gt;
&lt;li&gt;Push your changes to trigger automatic deployment&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vercel CLI:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; vercel
vercel &lt;span class="nt"&gt;--prod&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Vercel dashboard:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import your project from Git&lt;/li&gt;
&lt;li&gt;Configure build settings&lt;/li&gt;
&lt;li&gt;Deploy manually&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Test your Mailtrap Vercel integration
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Test the API endpoint
&lt;/h4&gt;

&lt;p&gt;After deployment, test your email functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Test the basic endpoint:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://your-project.vercel.app/api/send
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test the contact form endpoint:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://your-project.vercel.app/api/contact &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
"name": "John Doe",
"email": "john@example.com", 
"message": "Test message"
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Verify email delivery
&lt;/h4&gt;

&lt;p&gt;After testing, confirm successful integration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check your inbox for notification emails&lt;/li&gt;
&lt;li&gt;Review delivery status in &lt;a href="https://help.mailtrap.io/article/71-email-logs" rel="noopener noreferrer"&gt;Mailtrap Email Logs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Monitor email analytics and delivery metrics&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Wrapping up
&lt;/h3&gt;

&lt;p&gt;That's it for integrating Vercel with Mailtrap! You now have a simple three-step process: set up your Mailtrap account with API credentials, create a Next.js API route to send emails, and deploy to Vercel with your environment variables configured. This setup gives you reliable email sending from your serverless applications without complex infrastructure management.&lt;/p&gt;

&lt;p&gt;If you’d like to learn more about the topic, read our dedicated blog post on &lt;a href="https://mailtrap.io/blog/vercel-send-email/" rel="noopener noreferrer"&gt;Vercel SMTP integration&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>mailtrap</category>
      <category>vercel</category>
    </item>
    <item>
      <title>Send emails with Bolt.new and Mailtrap</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Tue, 02 Sep 2025 10:09:01 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/send-emails-with-boltnew-and-mailtrap-i7d</link>
      <guid>https://forem.com/ketbostoganashvili/send-emails-with-boltnew-and-mailtrap-i7d</guid>
      <description>&lt;p&gt;Learn how to integrate Mailtrap with your Bolt.new application to send transactional emails and manage contacts without writing complex code. &lt;/p&gt;

&lt;p&gt;This article is based on Mailtrap's official tutorial on &lt;a href="https://help.mailtrap.io/article/181-send-email-with-bolt-new" rel="noopener noreferrer"&gt;how to send email using Bolt.new&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before we start
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Required accounts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Bolt.new account - to create applications and generate logic&lt;/li&gt;
&lt;li&gt;Mailtrap account - to send emails with high deliverability&lt;/li&gt;
&lt;li&gt;Supabase account - to securely store API keys and manage your database&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Prerequisites setup
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Verify your email sending domain - Mailtrap allows you to send emails only from a verified domain. Follow &lt;a href="https://help.mailtrap.io/article/69-sending-domain-setup" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; to set up domain verification.&lt;/li&gt;
&lt;li&gt;Get your API token - Ensure your &lt;a href="https://mailtrap.io/api-tokens" rel="noopener noreferrer"&gt;API Token&lt;/a&gt; has admin access level to your domain and contacts.&lt;/li&gt;
&lt;li&gt;Find your Account ID - You'll need this for creating contacts in Mailtrap. Find it in your Account Management section.&lt;/li&gt;
&lt;li&gt;Create Custom Fields (if needed) - Set up &lt;a href="https://help.mailtrap.io/article/147-contacts" rel="noopener noreferrer"&gt;Custom fields&lt;/a&gt; in Mailtrap if your forms have additional inputs you want to save.&lt;/li&gt;
&lt;li&gt;Locate your List ID (optional) - If you want to organize contacts into specific lists, you'll need the list ID for contact management.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Important note: the prompts provided are based on our experience with Bolt.new as of August 2025. Since both Bolt.new and LLM models constantly evolve, you may need to adjust these prompts for your specific needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure Mailtrap Email API with Bolt.new
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Set up basic email sending
&lt;/h4&gt;

&lt;p&gt;Start with this prompt in Bolt.new to create a simple email sending functionality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Email should be sent via Mailtrap.io, as I have an account there.
- My Mailtrap verified domain is [your-domain.com]
- I want to send emails from hello@[your-domain.com]
- Save my Mailtrap API key in MAILTRAP_API_KEY secret
- Include and use Mailtrap NodeJS SDK https://www.npmjs.com/package/mailtrap to send emails. Use the latest available version of the npm package.

Documentation references:
- Readme https://github.com/railsware/mailtrap-nodejs/blob/main/README.md
- Implementation examples https://github.com/railsware/mailtrap-nodejs/tree/main/examples
- Email sending example: https://github.com/railsware/mailtrap-nodejs/blob/main/examples/sending/everything.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This basic setup will configure Mailtrap integration and prepare your environment for email sending.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Manage Mailtrap contacts automatically
&lt;/h4&gt;

&lt;p&gt;Enhance your setup to automatically add form submissions to Mailtrap Contacts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pass all my new users/form submissions to Mailtrap contacts:
- Use the latest version of Mailtrap NodeJS SDK to add contacts
- Use MAILTRAP_ACCOUNT_ID environment variable
- Use the same Token I use for production mode of Mailtrap, as it can also create Contacts
- Pass the name from my form to name field in Mailtrap
- Add users to MAILTRAP_LIST_ID

Database setup:
- Create contacts table in Supabase with columns: 
  - id (UUID, primary key)
  - name (text)
  - email (text)
  - message (text)
  - created_at (timestamp)
  - mailtrap_contact_id (text)
- Apply Supabase Row-Level Security (RLS) to restrict access to only authenticated users
- Save form contacts info from submissions in DB and use Mailtrap NodeJS SDK to create a contact in Mailtrap
- Save Mailtrap contact_id to mailtrap_contact_id column in contacts table

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Locate Your Mailtrap List ID (Optional)
&lt;/h4&gt;

&lt;p&gt;If you want to add contacts to a specific list in Mailtrap:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your List by clicking on it in Mailtrap&lt;/li&gt;
&lt;li&gt;Check the URL - it will look like: &lt;a href="https://mailtrap.io/contacts?filters=%5B%7B%22name%22:%22list_id%22,%22operator%22:%22equal%22,%22value%22:%5B23%5D%7D%5D" rel="noopener noreferrer"&gt;https://mailtrap.io/contacts?filters=%5B%7B%22name%22:%22list_id%22,%22operator%22:%22equal%22,%22value%22:%5B23%5D%7D%5D&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://www.urldecoder.org/" rel="noopener noreferrer"&gt;URL Decoder&lt;/a&gt; to decode the URL&lt;/li&gt;
&lt;li&gt;Find your list ID in the decoded URL (in this example, it's 23)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Build a landing page in Bolt.new
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Connect Bolt.new to Supabase
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;In your Bolt.new project, click the Integrations button at the top right&lt;/li&gt;
&lt;li&gt;Select Supabase from the available integrations&lt;/li&gt;
&lt;li&gt;Follow the setup wizard to connect your accounts&lt;/li&gt;
&lt;li&gt;Select the appropriate Supabase project for this integration&lt;/li&gt;
&lt;li&gt;Confirm the connection is established&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 2: Create a landing page with a contact form
&lt;/h4&gt;

&lt;p&gt;Use this comprehensive prompt to build a complete SaaS landing page with email functionality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a SaaS landing page with a contact form that collects the full name, email address, and message.

Company Information:
My SaaS is called [YourCompanyName], which helps customers [your value proposition]. Our form will capture leads who want to learn more about our services.

Page Structure:
- Hero section describing benefits with a button that scrolls to the form
- Testimonials/social proof/case studies section
- Contact form
- About section
- Contact Info section
- Links to social networks

Form Functionality:
- Add browser validation for the email input in the form, so only a valid email will pass
- Add minimum length of 50 characters for message field, and maximum length of 100 characters for Name input

As a customer submits a form:
- Send an email with form content to my email MAILTRAP_MY_EMAIL secret variable
- Emails should be sent from form-submissions@[your-verified-domain.com] (MAILTRAP_FROM_EMAIL)
- Create a contact in Mailtrap (name, email)
- Pass value from form's "Full name" input to Mailtrap's custom field name
- Add form submission info to Supabase contacts table
- Display submission confirmation to visitor
- Apply Supabase Row-Level Security (RLS) to restrict access to authenticated users

Email Integration:
- Email should be sent via Mailtrap using:
  - My Mailtrap account MAILTRAP_ACCOUNT_ID (store in Supabase Secrets)
  - Mailtrap NodeJS SDK for creating contacts and sending emails
  - Save Mailtrap API key in MAILTRAP_API_KEY secret

Plan step-by-step, verify results after each step. Write code in TypeScript, generate atomic files in the Supabase Edge function for easier debugging.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Configure your Mailtrap secrets
&lt;/h4&gt;

&lt;p&gt;After Bolt.new creates your application, add these secrets in your Supabase project:&lt;/p&gt;

&lt;p&gt;MAILTRAP_ACCOUNT_ID=your_account_id&lt;br&gt;
MAILTRAP_API_KEY=your_api_key&lt;br&gt;
MAILTRAP_MY_EMAIL=&lt;a href="mailto:your-email@example.com"&gt;your-email@example.com&lt;/a&gt;&lt;br&gt;
MAILTRAP_FROM_EMAIL=&lt;a href="mailto:form-submissions@your-verified-domain.com"&gt;form-submissions@your-verified-domain.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to replace the placeholder values with your actual Mailtrap credentials.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test your Mailtrap integration with Bolt.new
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Test form submission
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to your landing page in Bolt.new Preview&lt;/li&gt;
&lt;li&gt;Fill out the contact form with test data&lt;/li&gt;
&lt;li&gt;Submit the form and verify the confirmation message displays&lt;/li&gt;
&lt;li&gt;Check for any error messages in the console&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 2: Verify email delivery
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Check your inbox for the notification email&lt;/li&gt;
&lt;li&gt;Verify the contact appears in your Mailtrap Contacts&lt;/li&gt;
&lt;li&gt;Confirm the email content includes all form data&lt;/li&gt;
&lt;li&gt;Review the entry in your &lt;a href="https://help.mailtrap.io/article/71-email-logs" rel="noopener noreferrer"&gt;Mailtrap Email Logs&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 3: Check database integration
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Verify the contact was saved to your Supabase contacts table&lt;/li&gt;
&lt;li&gt;Confirm the Mailtrap contact ID was stored in the mailtrap_contact_id column&lt;/li&gt;
&lt;li&gt;Check that Row-Level Security is properly configured&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Bolt.new email sending best practices
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Security
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Always store sensitive information in Supabase Secrets, never in code&lt;/li&gt;
&lt;li&gt;Enable Row-Level Security (RLS) on all database tables&lt;/li&gt;
&lt;li&gt;Regularly rotate your API keys&lt;/li&gt;
&lt;li&gt;Use environment variables for all configuration values&lt;/li&gt;
&lt;li&gt;Implement proper input validation to prevent injection attacks&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Email deliverability
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use a verified domain for all outgoing emails&lt;/li&gt;
&lt;li&gt;Monitor your sender reputation in Mailtrap analytics&lt;/li&gt;
&lt;li&gt;Keep your contact lists clean and up-to-date&lt;/li&gt;
&lt;li&gt;Implement proper SPF, DKIM, and DMARC records&lt;/li&gt;
&lt;li&gt;Follow email content best practices to avoid spam filters&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  User experience
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Provide clear feedback when forms are submitted&lt;/li&gt;
&lt;li&gt;Include proper validation messages with helpful guidance&lt;/li&gt;
&lt;li&gt;Consider adding loading states during submission&lt;/li&gt;
&lt;li&gt;Make forms accessible with proper ARIA labels&lt;/li&gt;
&lt;li&gt;Implement error handling with user-friendly messages&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Performance
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use Supabase Edge Functions for server-side logic&lt;/li&gt;
&lt;li&gt;Implement proper error handling and retry mechanisms&lt;/li&gt;
&lt;li&gt;Consider rate limiting for form submissions&lt;/li&gt;
&lt;li&gt;Optimize API calls to minimize response times&lt;/li&gt;
&lt;li&gt;Monitor performance metrics and set up alerts&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pro tips
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Avoid Supabase email limits
&lt;/h4&gt;

&lt;p&gt;To bypass Supabase's hourly email sending limits, configure your Supabase project's SMTP settings to use Mailtrap. Follow this &lt;a href="https://help.mailtrap.io/article/165-supabase-and-mailtrap-integration" rel="noopener noreferrer"&gt;integration guide&lt;/a&gt; for detailed instructions.&lt;/p&gt;

&lt;h4&gt;
  
  
  Prompt optimization
&lt;/h4&gt;

&lt;p&gt;Start with basic functionality and iteratively improve your prompts. Bolt.new works best when you build features step-by-step rather than trying to create everything at once.&lt;/p&gt;

&lt;h4&gt;
  
  
  Error handling strategy
&lt;/h4&gt;

&lt;p&gt;Always include comprehensive error handling in your Bolt.new applications. Email operations can fail for various reasons, so ensure your users receive appropriate feedback and your application handles failures gracefully.&lt;/p&gt;

&lt;h4&gt;
  
  
  Performance monitoring
&lt;/h4&gt;

&lt;p&gt;Regularly review your Mailtrap analytics and Supabase performance metrics to identify optimization opportunities and ensure reliable email delivery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping up
&lt;/h3&gt;

&lt;p&gt;With Bolt.new and Mailtrap working together, you have a powerful foundation for building email-driven applications that can scale with your business needs. The combination of Bolt.new's rapid development capabilities and Mailtrap's reliable email infrastructure enables you to create professional email experiences quickly and efficiently.&lt;/p&gt;

</description>
      <category>mailtrap</category>
      <category>bolt</category>
      <category>transactionalemails</category>
      <category>vibecoding</category>
    </item>
    <item>
      <title>Send emails with v0 and Mailtrap</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Mon, 01 Sep 2025 10:48:17 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/send-emails-with-v0-and-mailtrap-44ee</link>
      <guid>https://forem.com/ketbostoganashvili/send-emails-with-v0-and-mailtrap-44ee</guid>
      <description>&lt;p&gt;Learn how to integrate Mailtrap with your v0 application to send transactional emails and manage contacts without writing complex code.&lt;/p&gt;

&lt;p&gt;This article is based on Mailtrap's official tutorial on &lt;a href="https://help.mailtrap.io/article/179-send-email-with-v0" rel="noopener noreferrer"&gt;how to send email using v0&lt;/a&gt; and industry best practices for email integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before we start
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Required accounts
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;v0 account - to create contact forms and web interfaces&lt;/li&gt;
&lt;li&gt;Mailtrap account - to send emails with high deliverability&lt;/li&gt;
&lt;li&gt;Vercel account (optional) - to deploy your v0 projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Prerequisites setup
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Verify your email sending domain - Mailtrap allows you to send emails only from a verified domain. Follow &lt;a href="https://help.mailtrap.io/article/69-sending-domain-setup" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; to set up domain verification.&lt;/li&gt;
&lt;li&gt;Get your API token - Ensure your &lt;a href="https://mailtrap.io/api-tokens" rel="noopener noreferrer"&gt;API Token&lt;/a&gt; has admin access level to your domain and contacts.&lt;/li&gt;
&lt;li&gt;Prepare your credentials - You'll need your Mailtrap API key and verified sending domain for the integration.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Configure Mailtrap with v0
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Create a contact form in v0
&lt;/h4&gt;

&lt;p&gt;Start by logging into your v0 account and create a basic contact form. Use this prompt to generate a functional form with email capabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a basic contact form with 'full name', 'email address', and 'message' fields as well as a 'send message' button. Keep in mind that I'll connect it with Mailtrap so I can send emails. To connect Mailtrap and send emails, I'll use my Mailtrap API key and verified domain.

Requirements:
- Form should have proper validation for email field
- Include error handling for form submission
- Add loading states during email sending
- Style the form to be modern and responsive
- Prepare integration points for Mailtrap API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This basic setup will create a contact form ready for Mailtrap integration. v0 will generate the React component with all necessary form handling logic.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Integrate Mailtrap email API functionality
&lt;/h4&gt;

&lt;p&gt;After v0 generates your contact form, you'll need to enhance it with Mailtrap email sending capabilities. Use this follow-up prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enhance this contact form to send emails using Mailtrap API:

Integration requirements:
- Use Mailtrap Email API (not SMTP) for sending emails
- Add environment variables for MAILTRAP_API_KEY and MAILTRAP_FROM_EMAIL
- Send form submissions to my notification email
- Include proper error handling for API requests
- Add success/failure feedback to users
- Implement email rate limiting to prevent spam

Email functionality:
- Send notification emails when form is submitted
- Include all form data (name, email, message) in the email
- Use proper email headers and formatting
- Add email validation before sending

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Add your Mailtrap credentials
&lt;/h4&gt;

&lt;p&gt;After v0 generates your enhanced project, you'll need to configure your Mailtrap credentials. Add the following environment variables to your project:&lt;/p&gt;

&lt;p&gt;MAILTRAP_API_KEY=your_mailtrap_api_key&lt;br&gt;
MAILTRAP_FROM_EMAIL=&lt;a href="mailto:hello@your-verified-domain.com"&gt;hello@your-verified-domain.com&lt;/a&gt;&lt;br&gt;
MAILTRAP_TO_EMAIL=&lt;a href="mailto:your-email@example.com"&gt;your-email@example.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to use the exact API key from your Mailtrap dashboard and ensure the from email matches your verified domain.&lt;/p&gt;
&lt;h3&gt;
  
  
  Send emails with v0 and Mailtrap
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Step 1: Create a comprehensive landing page
&lt;/h4&gt;

&lt;p&gt;For more advanced use cases, create a complete landing page with integrated email functionality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a SaaS landing page with email integration using Mailtrap:

Page structure:
- Hero section with compelling headline and call-to-action
- Features section highlighting key benefits
- Testimonials/social proof section
- Contact form for lead capture
- Footer with company information

Email functionality:
- Send welcome emails to new subscribers
- Notify admin of new form submissions
- Add contacts to Mailtrap for future campaigns
- Include proper email templates and branding
- Implement email analytics tracking

Form requirements:
- Collect name, email, and optional message
- Add email validation and spam protection
- Include privacy policy acceptance
- Provide clear success/error messaging
- Make form mobile-responsive

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: Implement contact management with Mailtrap
&lt;/h4&gt;

&lt;p&gt;Enhance your v0 application to automatically manage contacts in Mailtrap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add contact management features to my v0 application:

Contact functionality:
- Automatically add form submissions to Mailtrap Contacts
- Create custom fields for additional user data
- Organize contacts into appropriate lists
- Handle duplicate contact detection
- Sync contact updates between systems

Implementation requirements:
- Use Mailtrap Contacts API for contact management
- Add proper error handling for API calls
- Include data validation before contact creation
- Implement retry logic for failed requests
- Log contact creation activities for debugging
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Set up email templates with Mailtrap
&lt;/h4&gt;

&lt;p&gt;Create reusable email templates for consistent branding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Integrate Mailtrap email templates into my v0 application:

Template setup:
- Create welcome email template for new subscribers
- Design notification template for admin alerts
- Build confirmation template for form submissions
- Add password reset template for user accounts
- Include branded email footer with unsubscribe links

Template features:
- Use Mailtrap's template variables for personalization
- Include responsive email design for mobile devices
- Add proper alt text for images and accessibility
- Implement A/B testing capabilities for subject lines
- Track email opens, clicks, and conversions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Test your Mailtrap integration with v0
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Test form submission
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Fill out your contact form with test data&lt;/li&gt;
&lt;li&gt;Submit the form and verify loading states work correctly&lt;/li&gt;
&lt;li&gt;Check for proper success/error messaging&lt;/li&gt;
&lt;li&gt;Confirm form resets after successful submission&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 2: Verify email delivery
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Check your inbox for the notification email&lt;/li&gt;
&lt;li&gt;Verify email formatting and content accuracy&lt;/li&gt;
&lt;li&gt;Confirm sender information displays correctly&lt;/li&gt;
&lt;li&gt;Test email links and call-to-action buttons&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Step 3: Monitor Mailtrap analytics
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Review the email in your &lt;a href="https://help.mailtrap.io/article/71-email-logs" rel="noopener noreferrer"&gt;Mailtrap Email Logs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check delivery status and any bounce notifications&lt;/li&gt;
&lt;li&gt;Monitor email analytics including opens and clicks&lt;/li&gt;
&lt;li&gt;Review sender reputation metrics in your dashboard&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  v0 email sending best practices
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Security
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Store API keys securely in environment variables, never in code&lt;/li&gt;
&lt;li&gt;Implement proper input validation to prevent injection attacks&lt;/li&gt;
&lt;li&gt;Use HTTPS for all email-related API endpoints&lt;/li&gt;
&lt;li&gt;Regularly rotate your Mailtrap API tokens&lt;/li&gt;
&lt;li&gt;Add rate limiting to prevent abuse of your forms&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Email deliverability
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use a verified domain for all outgoing emails&lt;/li&gt;
&lt;li&gt;Monitor your sender reputation through Mailtrap analytics&lt;/li&gt;
&lt;li&gt;Keep your contact lists clean and up-to-date&lt;/li&gt;
&lt;li&gt;Implement proper SPF, DKIM, and DMARC records&lt;/li&gt;
&lt;li&gt;Follow email best practices for content and formatting&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  User experience
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Provide clear feedback when forms are submitted&lt;/li&gt;
&lt;li&gt;Include proper validation messages with helpful guidance&lt;/li&gt;
&lt;li&gt;Add loading states during form submission processes&lt;/li&gt;
&lt;li&gt;Consider adding email preferences and unsubscribe options&lt;/li&gt;
&lt;li&gt;Make forms accessible with proper ARIA labels&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Performance
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Optimize API calls to minimize response times&lt;/li&gt;
&lt;li&gt;Implement proper error handling and retry logic&lt;/li&gt;
&lt;li&gt;Consider caching frequently used email templates&lt;/li&gt;
&lt;li&gt;Monitor API usage and set up alerts for unusual activity&lt;/li&gt;
&lt;li&gt;Use efficient form validation to reduce server load&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pro tips
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Optimize v0 prompts for email integration
&lt;/h4&gt;

&lt;p&gt;Start with basic functionality and iteratively improve your prompts. v0 works best when you build features step-by-step rather than trying to create everything at once. Begin with simple contact forms and gradually add more sophisticated email features.&lt;/p&gt;

&lt;h4&gt;
  
  
  Leverage Mailtrap's template system
&lt;/h4&gt;

&lt;p&gt;Use &lt;a href="https://help.mailtrap.io/article/105-email-templates" rel="noopener noreferrer"&gt;Mailtrap's email template builder&lt;/a&gt; to create professional email designs without coding. This approach separates design from development and makes it easier to maintain consistent branding across all communications.&lt;/p&gt;

&lt;h4&gt;
  
  
  Implement proper error handling
&lt;/h4&gt;

&lt;p&gt;Always include comprehensive error handling in your v0 applications. Email delivery can fail for various reasons, so ensure your users receive appropriate feedback and your application gracefully handles API errors.&lt;/p&gt;

&lt;h4&gt;
  
  
  Monitor email performance
&lt;/h4&gt;

&lt;p&gt;Regularly review your &lt;a href="https://help.mailtrap.io/article/88-statistics" rel="noopener noreferrer"&gt;Mailtrap analytics&lt;/a&gt; to optimize email performance. Track metrics like open rates, click-through rates, and bounce rates to identify areas for improvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next?
&lt;/h3&gt;

&lt;p&gt;With v0 and Mailtrap working together, you have a powerful foundation for building email-driven applications that can scale with your business needs. Happy sending! &lt;/p&gt;

</description>
      <category>mailtrap</category>
      <category>v0</category>
      <category>transactionalemails</category>
      <category>promptengineering</category>
    </item>
    <item>
      <title>How to Create an HTML Template That Email Clients Render Well</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Wed, 24 Jul 2024 06:44:38 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/how-to-create-an-html-template-that-email-clients-render-well-5dnm</link>
      <guid>https://forem.com/ketbostoganashvili/how-to-create-an-html-template-that-email-clients-render-well-5dnm</guid>
      <description>&lt;p&gt;A developer can’t code an HTML email template using the same technologies and approaches as one would when building a web page. It may sound ridiculous, but it’s the truth. So, let’s try to figure out how valid this statement is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Email clients with no standards
&lt;/h2&gt;

&lt;p&gt;While coding a web page, an engineer takes the following factors into consideration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;operating system&lt;/li&gt;
&lt;li&gt;browser type&lt;/li&gt;
&lt;li&gt;screen size&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When building an HTML email template, in addition to the operating system and screen size, one has to account for the email client.&lt;/p&gt;

&lt;p&gt;There is a wide selection of email clients that encompasses several web and desktop solutions, where the way an email is displayed depends largely on the rendering engine a system uses.&lt;/p&gt;

&lt;p&gt;Of course, a universal set of standards would be much easier for email clients to support and for developers to comply with. But, unfortunately, we don’t have any. Every email client plays by its own rules. That’s why the rendering of CSS by various email clients may differ significantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Top 10 email clients in 2018
&lt;/h2&gt;

&lt;p&gt;In June 2018, Litmus released an &lt;a href="https://emailclientmarketshare.com/" rel="noopener noreferrer"&gt;Email Client Market Share report&lt;/a&gt; which was based on 1.04B email opens data they gathered worldwide. One can review this report to get an idea about the core market players and their shares in this area.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9ncereorvg7ztvqmyrw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9ncereorvg7ztvqmyrw.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Know what email clients your target audience prefers
&lt;/h2&gt;

&lt;p&gt;Although having access to the general stats provided by Litmus is great, we would recommend you check what devices and email clients your target audience uses. Having this information at hand will simplify the email development process by reducing the number of devices and email clients an engineer has to tailor an email for.&lt;/p&gt;

&lt;p&gt;If you are using &lt;strong&gt;Mailchimp&lt;/strong&gt;, go to &lt;strong&gt;List&lt;/strong&gt; and check the following stats:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wkwcl01y40er6mzml5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wkwcl01y40er6mzml5g.png" alt=" " width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are using &lt;strong&gt;Sendgrid&lt;/strong&gt;, go to &lt;strong&gt;Stats&lt;/strong&gt;, and then &lt;strong&gt;Email Clients &amp;amp; Devices&lt;/strong&gt;. Sendgrid will provide you with several respective categories: Top Devices, Top Webmail Clients, and Top Desktop Clients.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fszz96dhuesnhw737td21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fszz96dhuesnhw737td21.png" alt=" " width="800" height="328"&gt;&lt;/a&gt;&lt;br&gt;
_The top devices used to open Mailtrap email campaigns in Sendgrid&lt;br&gt;
_&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg45ea45dlxbugeis12s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg45ea45dlxbugeis12s.png" alt=" " width="800" height="328"&gt;&lt;/a&gt;&lt;br&gt;
_The top webmail clients used to open Mailtrap email campaigns in Sendgrid&lt;br&gt;
_&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8clg5n62hcgfv6f1rp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8clg5n62hcgfv6f1rp1.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;br&gt;
_The top desktop email clients used to open Mailtrap email campaigns in Sendgrid&lt;br&gt;
_&lt;/p&gt;

&lt;h3&gt;
  
  
  Outlook email client
&lt;/h3&gt;

&lt;p&gt;According to the Litmus Email Client Market Share report, Outlook ranks #5 with a 7% market share. However, not everyone knows that Outlook for Windows still uses the Microsoft Word engine for rendering. At the same time, Outlook for Mac supports almost any kind of HTML and CSS formatting.&lt;/p&gt;

&lt;p&gt;Below are only some of the aspects a developer should bear in mind when adjusting an email template for an Outlook email client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Outlook does not “understand” HTML bulleted list tags&lt;/li&gt;
&lt;li&gt;Outlook uses Times New Roman as the default font&lt;/li&gt;
&lt;li&gt;Outlook may add a page break to an email if it exceeds 1800px&lt;/li&gt;
&lt;li&gt;Outlook cleans up paragraph and margin spacing&lt;/li&gt;
&lt;li&gt;Outlook does not support background images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course, some of the above-mentioned cases may be solved by using a “table” tag structure in an email template, while others require special tricks and workarounds that engineers may apply to ensure correct email rendering.&lt;/p&gt;

&lt;h2&gt;
  
  
  The best ways to create HTML emails
&lt;/h2&gt;

&lt;p&gt;There are some aspects that one should consider when building &lt;a href="https://beefree.io/templates/" rel="noopener noreferrer"&gt;HTML email templates&lt;/a&gt;. Let’s review the suggestions below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use simple design
&lt;/h3&gt;

&lt;p&gt;We recommend developers keep the email design simple. Apply grid-based layers and stay away from the elements that include positioning or HTML floats.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adjust HTML emails to different screen sizes
&lt;/h3&gt;

&lt;p&gt;With Apple iPhone email client ranking #1 in the recent Litmus report, one can see clearly that it is crucial for an email template to display well not only on desktop but also on tablet and smartphone.&lt;br&gt;
To succeed with this task, one can try using scalable, fluid, or responsive design. So, let’s dive a bit deeper into each type of design to choose the one which will suit your requirements best.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scalable HTML email design
&lt;/h4&gt;

&lt;p&gt;This type of design presumes the presence of a minimum number of structural elements in an email. That’s why it usually consists of one text column that can be easily scaled for all types of devices, one image, and a Call to Action (CTA) button.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fluid HTML email design
&lt;/h4&gt;

&lt;p&gt;The fluid design uses percentages to adjust to a recipient’s screen size by filling up all space in an email just like fluid would do in an empty container. However, to make sure an email’s content does not cover all the available screen area, it is recommended to configure the table’s maximum width. It’s a common practice to set the default width to 600px.&lt;/p&gt;

&lt;h4&gt;
  
  
  Responsive HTML email design
&lt;/h4&gt;

&lt;p&gt;Utilizing responsive design, in turn, allows sending customized HTML email templates that may automatically adjust not only the size but also the content depending on a recipient’s device and screen size. The desktop and the mobile version of an email may differ significantly from each other or may be alike. In the end, a desktop version of an email may include more or different components than a mobile version and vice versa, which makes this type of design universal for all devices and screen sizes (existing and newly introduced).&lt;/p&gt;

&lt;p&gt;Media queries, introduced in CSS3, empower responsive design. The top email clients are well aware of what media queries are. However, it’s worth keeping in mind that there are still email clients that won’t succeed with their rendering at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  Think about mobile users
&lt;/h3&gt;

&lt;p&gt;Working with HTML email design, one should remember the golden rule – mobile design goes first. I.e., a mobile version should be checked first to decrease the loading time on small devices. For instance, the first condition may be set as “larger than 768 pixels”.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose the right fonts
&lt;/h3&gt;

&lt;p&gt;Many email clients won’t be able to render Google Fonts properly. In this case, one should opt for the common fonts that the major email clients interpret well. Such as Times New Roman, Arial, Georgia, and Verdana.&lt;/p&gt;

&lt;h3&gt;
  
  
  Take images seriously
&lt;/h3&gt;

&lt;p&gt;Some email clients block images by default and some users may amend their inbox settings to block images if the client isn’t doing it. So, it is best to follow the advice below when coding an email template:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accompany your image header with text to make sure that a user will still understand what the email is about, even if the image gets blocked.&lt;/li&gt;
&lt;li&gt;Don’t build HTML emails that consist of one or two large images only. If one of them or both are not displayed properly, it will ruin the entire email campaign.&lt;/li&gt;
&lt;li&gt;Keep your emails simple by adding just enough images and text to guarantee that your message still makes sense even if all images are blocked.&lt;/li&gt;
&lt;li&gt;If your email includes a call to action (CTA) in the form of a button, don’t use an image to format the CTA. Instead, you can try to create a padding-based button. This simple method uses both HTML and CSS for button building.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Last but not least: keep in mind the email size. The &lt;a href="https://mailtrap.io/blog/email-size/" rel="noopener noreferrer"&gt;maximum file size limits for emails&lt;/a&gt; are pretty high, but the recommended size of the email body should not exceed 250KB.&lt;/p&gt;

&lt;p&gt;For more development tips and code samples, check our &lt;a href="https://mailtrap.io/blog/build-html-email/" rel="noopener noreferrer"&gt;guide on building HTML Email&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Otherwise, you can try using an HTML email builder. They usually come with a set of customizable email templates, which can be used in any email sending system. In &lt;a href="https://mailtrap.io/blog/best-email-builders/" rel="noopener noreferrer"&gt;this post&lt;/a&gt;, we have reviewed the ten tools suitable for both developers’ and marketers’ needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We hope that this blog post addressed some of the core aspects you should be paying attention to when crafting an email template. 😉&lt;/p&gt;

&lt;p&gt;We appreciate you chose this article to know how to &lt;a href="https://mailtrap.io/blog/building-html-email-template/" rel="noopener noreferrer"&gt;build responsive HTML email template&lt;/a&gt;. To read more article on related topics, follow Mailtrap blog!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What Is Email Bounce Rate and Why Is It Important?</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Wed, 31 Jan 2024 10:12:48 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/what-is-email-bounce-rate-and-why-is-it-important-4o5l</link>
      <guid>https://forem.com/ketbostoganashvili/what-is-email-bounce-rate-and-why-is-it-important-4o5l</guid>
      <description>&lt;p&gt;We all know that spam complaints are a nightmare for anyone sending marketing emails. But so are bounce rates, especially if they are high. &lt;/p&gt;

&lt;p&gt;In today’s blog post, we’ll guide you through the maze of email bounce rates and provide useful tips for keeping them in check. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is email bounce rate?
&lt;/h2&gt;

&lt;p&gt;An email bounce rate is the percentage of emails that couldn’t be delivered from the total number of sent emails. &lt;a href="https://mailtrap.io/blog/what-is-email-bounce/"&gt;Email bounce&lt;/a&gt; itself is a delivery failure, either temporary or permanent. &lt;/p&gt;

&lt;p&gt;Let’s say you want to surprise a friend you haven’t seen for ages. You search for their address in your address book and head to their apartment. When you arrive, you find out that they don’t live there anymore. You go back home feeling frustrated. &lt;/p&gt;

&lt;p&gt;Well, that’s what happens to your emails when they can’t reach your recipient’s email address. Sad bounced emails return back to you. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/nGN6R_Wty-c"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Generally, there are two types of email bounces: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Soft bounce&lt;/strong&gt;: a temporary issue with delivery. It usually means that there’s a problem with the recipient’s email server or mailbox. Typical causes include full inbox, server overload or error, and &lt;a href="https://mailtrap.io/blog/avoid-spam-filters/"&gt;spam filters&lt;/a&gt;. Since soft bounces are temporary, mail servers will attempt to deliver emails again later. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fululbihci3ihalqvfd0f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fululbihci3ihalqvfd0f.png" alt="Image description" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hard bounce&lt;/strong&gt;: a permanent delivery failure. Hard bounces have a greater impact on &lt;a href="https://mailtrap.io/blog/email-sender-reputation/"&gt;sender reputation&lt;/a&gt; and &lt;a href="https://mailtrap.io/blog/email-deliverability/"&gt;email deliverability&lt;/a&gt;. Common causes include invalid email addresses, improperly configured (or not configured) email authentication protocols, or blacklisted IPs. Unlike soft bounces, mail servers won’t attempt to resend hard-bounced emails. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1zh7k3984blfekplm9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1zh7k3984blfekplm9p.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read &lt;a href="https://mailtrap.io/blog/soft-vs-hard-bounce/"&gt;this blog post&lt;/a&gt; for more information on the differences between soft and hard bounces. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to calculate email bounce rate
&lt;/h3&gt;

&lt;p&gt;To calculate the email bounce rate, we have to divide the number of bounces by the number of total sent emails. Then we have to multiply the result by 100 to calculate the percentage. So, the formula would be: &lt;/p&gt;

&lt;p&gt;Bounce rate = number of bounced emails ÷ number of emails sent × 100&lt;/p&gt;

&lt;p&gt;If you send 1,000 emails and 100 of them bounce, the bounce rate would be 10%. &lt;/p&gt;

&lt;p&gt;Those who send mass emails will probably have a hard time calculating bounce rates manually. If you’re sending emails from an email service provider (ESP), you should have statistical data for bounced rates. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/email-sending/"&gt;Mailtrap Email Sending&lt;/a&gt;, for instance, has in-depth actionable analytics with drill-down reports and helicopter-view dashboards. That also includes email bounce rate data. &lt;/p&gt;

&lt;p&gt;As an example, let’s see how to check your email bounce rate in Mailtrap. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://mailtrap.io/signin"&gt;Sign into your account&lt;/a&gt;, choose Email Sending, and select ‘Stats’ in the left navigation panel. &lt;/li&gt;
&lt;li&gt;There, you’ll see the overall bounce rate for all domains in a selected timeframe. With quick filters, you can see stats for a specific domain.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvmbhyuhukw883groaz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvmbhyuhukw883groaz3.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To explore trends, scroll down to find a dedicated chart for bounced rates. The critical threshold is 5% – the rates above that will be indicated with a red line. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76h4qnvpi8humyf16m08.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76h4qnvpi8humyf16m08.png" alt="Image description" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;By clicking bounced emails, you’ll be redirected to Email Logs to find the reasons behind each bounce. &lt;/li&gt;
&lt;li&gt;It’s also possible to check bounce rates for different mailbox providers and categories and filter them for a specific domain, time frame, category, or provider. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr76cqc9rhwjxn0mj3ay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr76cqc9rhwjxn0mj3ay.png" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Email bounce rate benchmark
&lt;/h3&gt;

&lt;p&gt;So, what is a good email bounce rate? Based on cross-industry research, &lt;a href="https://www.hostingadvice.com/how-to/average-website-bounce-rate/#:~:text=5.%20An%20Email%20Bounce%20Rate%20of%20Less%20Than%202%25%20Is%20a%20Good%20Goal"&gt;anything below 2%&lt;/a&gt; is considered to be a normal bounce rate. 2% to 5% is a warning level, while above 5% is critical. &lt;/p&gt;

&lt;p&gt;Email providers regularly conduct research to figure out typical email bounce rates. However, those reports are usually based on the campaign data gathered from their users. While the scope of the research makes us believe that the results are objective, we should still take those numbers with a grain of salt. &lt;/p&gt;

&lt;p&gt;With that in mind, we decided to provide several examples of reports that have found typical bounce rates. That way, we won’t rely on one source of data. &lt;/p&gt;

&lt;h3&gt;
  
  
  Mailchimp email marketing benchmarks and statistics
&lt;/h3&gt;

&lt;p&gt;In 2019, Mailchimp created a &lt;a href="https://mailchimp.com/en-gb/resources/email-marketing-benchmarks/"&gt;comprehensive report&lt;/a&gt; on essential &lt;a href="https://mailtrap.io/blog/email-marketing-metrics/"&gt;email marketing metrics&lt;/a&gt;, such as average &lt;a href="https://mailtrap.io/blog/calculate-email-open-rate/"&gt;open rates&lt;/a&gt;, click rates, soft and hard bounces, and unsubscribe rates. They analyzed campaigns with at least 1,000 recipients. &lt;/p&gt;

&lt;p&gt;Mailchimp found that the Construction industry had the highest average hard bounce rate, amounting to 1.28%. The lowest, on the other hand, was in the Daily Deals/E-Coupons industry with 0.13%. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55ytxhk7mjewy70p9d25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55ytxhk7mjewy70p9d25.png" alt="Image description" width="800" height="999"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  MailerLite email marketing benchmarks
&lt;/h3&gt;

&lt;p&gt;MailerLite analyzed &lt;a href="https://www.mailerlite.com/blog/compare-your-email-performance-metrics-industry-benchmarks"&gt;2022 data from 40,000 accounts&lt;/a&gt;. They included the campaigns that were sent to at least 10 subscribers. As a result, their dataset included around 1M campaigns. &lt;/p&gt;

&lt;p&gt;In their report, Publishing companies had the lowest bounce rates (0.2%), while the highest bounce rates (1.32%) were in Architecture and Construction industries. &lt;/p&gt;

&lt;h3&gt;
  
  
  Benchmark Email report
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.benchmarkemail.com/email-marketing-benchmarks/"&gt;Benchmark email report&lt;/a&gt; analyzed a smaller group of users (≈7,470), and their numbers show a slightly different picture.&lt;/p&gt;

&lt;p&gt;Advertising/Marketing/PR/Media/Design industries had critically high email bounce rates, averaging 12.27%. In their report, Retail/Consumer Services had the lowest average email bounce rate (6.08%). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faix9pexsuokbcgkgf6b7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faix9pexsuokbcgkgf6b7.png" alt="Image description" width="800" height="1018"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Constant Contact average industry rates for emails
&lt;/h3&gt;

&lt;p&gt;Constant Contact analyzes &lt;a href="https://knowledgebase.constantcontact.com/articles/KnowledgeBase/5409-average-industry-rates?lang=en_US"&gt;data from over 200 million emails&lt;/a&gt; each month. Their report shows higher bounce rates compared to that of Mailchimp and MailerLite as well: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legal Services – 16.27%&lt;/li&gt;
&lt;li&gt;Manufacturing and Distribution – 14.73%&lt;/li&gt;
&lt;li&gt;Real Estate – 12.72% &lt;/li&gt;
&lt;li&gt;Repair and Maintenance – 5.92%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsoq6d195y9lkskevqyac.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsoq6d195y9lkskevqyac.png" alt="Image description" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can make three main conclusions from the reports we saw above: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The source of analysis makes a huge difference in average results;&lt;/li&gt;
&lt;li&gt;The acceptable email bounce rate is still below 2% regardless of industry averages;&lt;/li&gt;
&lt;li&gt;The bounce rates differ depending on the industry.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What causes high bounce rates?
&lt;/h2&gt;

&lt;p&gt;High bounce rates for email marketing campaigns and transactional messages can have multiple causes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Old or poorly maintained subscriber lists&lt;/strong&gt; including &lt;a href="https://salesintel.io/blog/should-you-build-or-buy-your-email-list-for-marketing/"&gt;bought email lists&lt;/a&gt;, unverified email addresses, and lists full of inactive subscribers. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spammy subject lines or content&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unreliable email infrastructure&lt;/strong&gt; with blacklisted IPs, unauthenticated domains, and spam-abused systems &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public domains&lt;/strong&gt; such as @gmail.com or @yahoo.com. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to decrease the email bounce rate? 6 tips to follow
&lt;/h2&gt;

&lt;p&gt;Not all is lost if your email bounce rates are high. By taking the necessary measures, you can gradually reduce them. Here’s how to improve email bounce rate and keep it as low as possible. &lt;/p&gt;

&lt;h3&gt;
  
  
  Use legitimate practices while building email lists
&lt;/h3&gt;

&lt;p&gt;Marketing email campaigns rely on email lists and building them requires a lot of time and effort. The easy way out is to purchase ready-made lists and blast out thousands of emails right away. But an easy way certainly doesn’t mean the best way. &lt;/p&gt;

&lt;p&gt;Bought email lists usually contain spam traps. Those are recycled email addresses that are no longer in use by real recipients. If you send an email to such addresses, you’ll immediately be labeled as a spammer. As a result, your bounce rates will increase and email deliverability will suffer. &lt;/p&gt;

&lt;p&gt;The good practice is to build permission-based email lists i.e. ask your users whether they want to receive marketing emails or not. This can be done by adding a consent checkbox in your sign-up forms. Double opt-in (sending a confirmation email after the user consents to receive marketing emails) is even better. &lt;/p&gt;

&lt;p&gt;Showing up unannounced is creepy both in real life and in the world of emails. &lt;/p&gt;

&lt;p&gt;All of these measures will reduce your chances of landing in spam folders and getting high bounce rates. &lt;/p&gt;

&lt;h3&gt;
  
  
  Clean up and validate your mailing list regularly
&lt;/h3&gt;

&lt;p&gt;Email lists are like cars – you’ll face serious consequences unless you maintain them regularly. To do so, you should regularly go through your subscriber list and remove inactive users. Most marketing tools have the option to automate that process. &lt;/p&gt;

&lt;p&gt;Another step you should take is validating your lists to remove invalid addresses. These are addresses that don’t exist anymore or have typos. Email bounce rate tools such as ZeroBounce, NeverBounce, Verifalia, etc. will help you check your email lists and keep valid email addresses in them. They won’t be 100% accurate, but they will help you maintain acceptable bounce rates. &lt;/p&gt;

&lt;h3&gt;
  
  
  Test your emails before sending them to intended recipients
&lt;/h3&gt;

&lt;p&gt;Testing your emails before sending them to recipients is always a good idea. It will help you eliminate any sending issues beforehand and test email bounce rate to some extent. There are two ways to go about it: messing with dummy email accounts and using dedicated tools. We don’t recommend the first option because it requires too much effort and doesn’t provide comprehensive insights. &lt;/p&gt;

&lt;p&gt;One tool you could use is &lt;a href="https://mailtrap.io/email-sandbox/"&gt;Mailtrap Email Testing.&lt;/a&gt; It’s part of the &lt;a href="https://mailtrap.io/"&gt;Mailtrap Email Delivery Platform&lt;/a&gt;. Email Testing provides you with a Sandbox to inspect and debug your emails in a staging environment. As it captures all the SMTP traffic, you can safely check the email-sending capabilities of your app and see if your emails get delivered to the inboxes. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://mailtrap.io/register/signup?ref=header"&gt;Try Mailtrap Email Testing for Free&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5svnbwr4x7cscpavb9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5svnbwr4x7cscpavb9e.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apart from that, Email Testing has a Spam Analysis feature that shows you Spam and Blacklist reports. By viewing those, you’ll see where your IP and domain reputation stands. If your spam score is high, it’s likely that your emails will bounce or get blocked by the recipient’s mail server. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmizdzvvwse53c27bidc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmizdzvvwse53c27bidc1.png" alt="Image description" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/register/signup?ref=header"&gt;Start Testing for Free&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your testing workflows can be a separate measure to send well-crafted emails or be part of &lt;a href="https://mailtrap.io/blog/email-sending-reputation-audit/"&gt;email sending reputation audit&lt;/a&gt;. The latter is a comprehensive ‘investigation’ that reveals the main culprits behind your email deliverability. That way, you’ll know for sure what’s causing your bounce rates and work in that direction. &lt;/p&gt;

&lt;p&gt;Alternatively, you could hire &lt;a href="https://mailtrap.io/blog/email-deliverability-consultants/"&gt;email deliverability consultants&lt;/a&gt; who will conduct the audit, provide feedback, and help you plan all the deliverability-related steps. &lt;/p&gt;

&lt;h3&gt;
  
  
  Send emails from a reliable email infrastructure
&lt;/h3&gt;

&lt;p&gt;Sending emails from a reliable &lt;a href="https://mailtrap.io/blog/email-infrastructure/"&gt;email infrastructure&lt;/a&gt; is a surefire way to reduce and prevent high bounce rates. It will also help you maintain good deliverability rates. The reason is simple: reputable ESPs have a good &lt;a href="https://mailtrap.io/blog/email-ip-reputation/"&gt;IP reputation&lt;/a&gt; for their shared IPs, as well as an option to use dedicated IPs if the sending volume is high enough. On top, they take strict security measures to keep the spammers at bay.&lt;/p&gt;

&lt;p&gt;Typically, ESPs and sending solutions require you to authenticate your domains with &lt;a href="https://www.youtube.com/watch?v=3O42vhFT0j8"&gt;SPF&lt;/a&gt;, &lt;a href="https://www.youtube.com/watch?v=jy6YMzQZTz8"&gt;DKIM&lt;/a&gt;, and &lt;a href="https://www.youtube.com/watch?v=zT1wMIz8_IU"&gt;DMARC&lt;/a&gt; records before you start sending. This adds to your domain’s credibility and lowers the chances of landing in spam folders. Not only that, &lt;a href="https://support.google.com/mail/answer/81126?sjid=12081390133285726533-EU"&gt;Google&lt;/a&gt; and &lt;a href="https://senders.yahooinc.com/best-practices/"&gt;Yahoo&lt;/a&gt; now require regular and high-volume senders to have these records in place. You don’t have that option with free email accounts and email domains. Large volumes of emails coming from such addresses immediately raise the yellow flag (a.k.a. spam) among ISPs. &lt;/p&gt;

&lt;p&gt;Using an ESP is sort of an industry-standard whether you’re sending email blasts, general marketing campaigns, or transactional emails. &lt;/p&gt;

&lt;p&gt;One such software is M&lt;a href="https://mailtrap.io/email-sending/"&gt;ailtrap Email Sending&lt;/a&gt; we mentioned above – the second solution offered by Mailtrap. It’s an email infrastructure to reach your recipients’ inboxes. This platform has RESTful API and SMTP services. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://mailtrap.io/register/signup?ref=header"&gt;Try Mailtrap Email Sending for Free&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;To keep your bounce rates in check, Email Sending provides ready-made DNS records for authentication protocols. It runs regular security checks to prevent spam abuse and protect the reputation of shared IPs. As you start sending at least 100K emails a month, you get the option to use a dedicated IP included in your plan. Dedicated IPs have auto warm-ups to prevent email bounces and spam complaints. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa55mkjo0zupw5v0a8xav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa55mkjo0zupw5v0a8xav.png" alt="Image description" width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Email Sending also has strict policies regarding bounce rates. If your emails soft bounce, the platform will attempt to send them 10 more times. If the outcomes are unsuccessful, the emails will be hard bounced and added to your stats. &lt;/p&gt;

&lt;p&gt;Hard-bounced emails are added to &lt;a href="https://mailtrap.io/blog/email-suppression-list/"&gt;suppression lists&lt;/a&gt; automatically to protect your deliverability. You can view and manage those in the ‘Suppressions’ tab, and examine the reasons for each bounce. While you can reactivate any suppressed email address, we strongly recommend against activating invalid addresses. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99anrpmhcp8nta27niyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F99anrpmhcp8nta27niyw.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/register/signup?ref=header"&gt;Start Sending for Free&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Craft non-spammy email content
&lt;/h3&gt;

&lt;p&gt;The spammy email content is another reason why your emails might get considered as spam and bounce. That’s why you should avoid spammy words (‘big bucks’, ‘free money’, ‘million dollars’, etc.) in your subject lines and copies. &lt;/p&gt;

&lt;p&gt;Use A/B testing whenever possible. Whether you’re talking to new subscribers or trying to &lt;a href="https://forms.app/en/blog/how-to-conduct-a-survey-online"&gt;conduct surveys&lt;/a&gt;, it’s a good idea to test various portions of emails separately. Run A/B testing campaigns for subject lines, CTAs, email bodies, body formats, and other parts of your emails. That way, you’ll be sending the content your audience likes, which leads to fewer spam complaints. &lt;/p&gt;

&lt;h3&gt;
  
  
  Create and follow email marketing strategy
&lt;/h3&gt;

&lt;p&gt;An &lt;a href="https://mailtrap.io/blog/email-marketing-strategy/"&gt;email marketing strategy&lt;/a&gt; is a detailed roadmap for your campaigns. As it’s based on comprehensive research, it allows you to tailor your tactics and campaigns to your audiences. With a strategy, you won’t send random emails to random people. Each step will be carefully calculated, resulting in better open, click, and click-through rates. Good audience engagement improves your sender reputation and helps maintain low bounce rates. &lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;p&gt;Let’s end this blog post with a few key takeaways: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email bounce rate affects your email deliverability &lt;/li&gt;
&lt;li&gt;To keep bounce rates low, you should avoid buying mailing lists and run permission-based email marketing &lt;/li&gt;
&lt;li&gt;Email list validation is a great way to reduce hard bounces &lt;/li&gt;
&lt;li&gt;Email infrastructure impacts your bounce rates &lt;/li&gt;
&lt;li&gt;It’s important to develop an email marketing strategy and run high-quality campaigns.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And with this good-ol’ meme, farewell folks! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysgt632t3awspsdqzvu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysgt632t3awspsdqzvu5.png" alt="Image description" width="400" height="525"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We appreciate the you chose this article to find out &lt;a href="https://mailtrap.io/blog/email-bounce-rate/"&gt;how to improve email bounce rate&lt;/a&gt;. If you want to find more interesting content on related topics, follow Mailtrap blog!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Test Emails in Your Python App</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Sun, 07 Jan 2024 09:57:21 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/how-to-test-emails-in-your-python-app-58nj</link>
      <guid>https://forem.com/ketbostoganashvili/how-to-test-emails-in-your-python-app-58nj</guid>
      <description>&lt;p&gt;Python provides multiple ways of testing emails. It has native options and the ability to integrate with a third-party tool, such as Mailtrap Email Testing. &lt;/p&gt;

&lt;p&gt;I’ve recently explored a few approaches and will share my experience in this tutorial. I’ll cover native methods such as unit tests + aiosmtpd, Python’s subprocess function, as well as unit tests’ mock object library.&lt;/p&gt;

&lt;p&gt;I’ll also demonstrate how to integrate and test emails in Python with Mailtrap Email Testing. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4-QZn5de72g"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Native ways of testing emails in Python
&lt;/h2&gt;

&lt;p&gt;Let’s start with the native ways of testing Python emails. &lt;/p&gt;

&lt;h3&gt;
  
  
  Using unit tests and aiosmtpd
&lt;/h3&gt;

&lt;p&gt;Aiosmtpd is a library that lets you set up a local SMTP (Simple Mail Transfer Protocol) server. This will create a testing environment and handle email traffic internally. So, your test emails won’t reach the recipients. Refer to aiosmtpd’s &lt;a href="https://github.com/aio-libs/aiosmtpd"&gt;GitHub page&lt;/a&gt; for more information. &lt;/p&gt;

&lt;p&gt;I’ll create a test for a simple text email. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.7 and up. 
Note: I added the code snippets below in the tests.py file. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To install aiosmtpd, run the &lt;code&gt;pip install aiosmtpd&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;Run the server with &lt;code&gt;python -m aiosmtpd -n&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;I’ll use the unit test framework, a standard library in all versions of Python since 2.1, and the smtplib library. smtplib module uses standard RFC 821 protocol for formatting messages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from unittest import TestCase
import smtplib
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a class that will inherit the unit test from the &lt;code&gt;TestCase&lt;/code&gt; object and configure the test case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class EmailTestCase(TestCase):
    def test_send_email(self):
        sender_email = "your_email@gmail.com"
        receiver_email = "receiver_email@example.com"
        message = "This is a test email."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;sender_email&lt;/code&gt; and &lt;code&gt;receiver_email&lt;/code&gt; variables can be populated with sample data as we simulate email sending. The message variable should contain the desired email body. &lt;/p&gt;

&lt;p&gt;The next step is to send a test email using the smtplib.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;with smtplib.SMTP(host="localhost", port=8025) as server:
            server.ehlo()
            server.sendmail(sender_email, receiver_email, message)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we create a new instance of an SMTP client. By default, the server works on localhost with port number 8025. We also initiated an SMTP handshake with EHLO and added the sendmail method to send the emails. The sendmail method takes three arguments – &lt;code&gt;sender_email&lt;/code&gt;, &lt;code&gt;receiver_email&lt;/code&gt;, and &lt;code&gt;message&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The script is now ready. Here’s the full sample:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from unittest import TestCase
import smtplib

class EmailTestCase(TestCase):
    def test_send_email(self):
        sender_email = "your_email@gmail.com"
        receiver_email = "receiver_email@example.com"
        message = "This is a test email."

        with smtplib.SMTP(host="localhost", port=8025) as server:
            server.ehlo()
            server.sendmail(sender_email, receiver_email, message)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run the Python code, use the Run button. &lt;/p&gt;

&lt;p&gt;If the test passes, you’ll see a message similar to the one below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GfVLhlEl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1eyjttffvf70iwwc33h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GfVLhlEl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1eyjttffvf70iwwc33h.png" alt="Image description" width="800" height="132"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll also see that the email was sent in the terminal. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7aC7SXGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzyoemrsbzbht7prezyu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7aC7SXGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yzyoemrsbzbht7prezyu.png" alt="Image description" width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Limitations of this approach
&lt;/h4&gt;

&lt;p&gt;While this approach can be useful for testing simple email-sending scripts, I found that it has multiple limitations: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each time I ran the tests, I had to type aiosmtpd manually. This is okay for small and occasional tests, but it’s a huge pain during scaled testing. &lt;/li&gt;
&lt;li&gt;As we’re simulating the process of sending emails, we can’t test real-world email delivery. &lt;/li&gt;
&lt;li&gt;This setup doesn’t allow for testing high email load. &lt;/li&gt;
&lt;li&gt;It doesn’t allow testing advanced email functionalities or features, such as client rendering, for example.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using Python’s subprocess function with unit tests and aiosmtpd
&lt;/h3&gt;

&lt;p&gt;One way to automate processes while using unit tests and aisosmtpd is Python’s subprocess function. It allows us to run an external program from the Python script. &lt;/p&gt;

&lt;p&gt;I first had to import the subprocess function and time module to improve and enhance the previous script. I’ll use the latter to wait for a few seconds before the server is ready.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from unittest import TestCase
import smtplib
import subprocess
import time 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, I added the &lt;code&gt;setUp&lt;/code&gt; method. It prepares the environment to run the server. &lt;code&gt;subprocess.Popen&lt;/code&gt; function will execute the command in a new process. &lt;/p&gt;

&lt;p&gt;In this case, the command is &lt;code&gt;exec python -m aiosmtpd -n&lt;/code&gt;, meaning that the server will run in a new process. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;shell-True&lt;/code&gt; will allow us to execute the command using the shell. We won’t have to create a new terminal. Rather, the process will run in the background. &lt;/p&gt;

&lt;p&gt;As mentioned, &lt;code&gt;time.sleep(2)&lt;/code&gt; will pause the execution of the script for 2 seconds to give the server enough time to be ready.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def setUp(self):
    self.process = subprocess.Popen(args='exec python -m aiosmtpd -n', shell=True)
    time.sleep(2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to add a &lt;code&gt;tearDown&lt;/code&gt; method, which will terminate the subprocess and wait for the process to finish termination.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def tearDown(self):
    self.process.kill()
    self.process.wait()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test itself is essentially the same, but I added one more assertion. It checks if the server is working and the socket is open.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;self.assertIsNotNone(server.sock)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s the complete code sample:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from unittest import TestCase
import smtplib
import subprocess
import time

class EmailTestCase(TestCase):
    def setUp(self):
        self.process = subprocess.Popen(args='exec python -m aiosmtpd -n', shell=True)
        time.sleep(2)

    def test_send_email(self):
        sender_email = "your_email@gmail.com"
        receiver_email = "receiver_email@example.com"
        message = "This is a test email."
        with smtplib.SMTP(host="localhost", port=8025) as server:
            server.ehlo()
            server.sendmail(sender_email, receiver_email, message)
            self.assertIsNotNone(server.sock)

    def tearDown(self):
        self.process.kill()
        self.process.wait()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, we can run the script with the Run button. &lt;/p&gt;

&lt;p&gt;The tests were successful, meaning the server was turned on and off as expected. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tec5uEw---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/az1e5xkoti62541myx6k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tec5uEw---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/az1e5xkoti62541myx6k.png" alt="Image description" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Running the script from the console
&lt;/h4&gt;

&lt;p&gt;As you’ll notice, I used the Run button to run the scripts in the previous examples. I’ll add the if statement to run the code from the console, modify the unit test import, and reference the &lt;code&gt;unittest.TestCase&lt;/code&gt; with the &lt;code&gt;EmailTestCase&lt;/code&gt; class definition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest
import smtplib
import subprocess
import time

class EmailTestCase(unittest.TestCase):

    def setUp(self):
        self.process = subprocess.Popen(args='exec python -m aiosmtpd -n', shell=True)
        time.sleep(2)

    def test_send_email(self):
        sender_email = "your_email@gmail.com"
        receiver_email = "receiver_email@example.com"
        message = "This is a test email."

        with smtplib.SMTP(host="localhost", port=8025) as server:
            server.ehlo()
            server.sendmail(sender_email, receiver_email, message)
            self.assertIsNotNone(server.sock)

    def tearDown(self):
        self.process.kill()
        self.process.wait()

if __name__ == '__main__':
    unittest.main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the updated setup, we can now run the code directly from the console using the &lt;code&gt;python tests.py&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gnB7GLHN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w4qdzsjiaoxgkw05x5j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gnB7GLHN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w4qdzsjiaoxgkw05x5j.png" alt="Image description" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Testing if the script can read files
&lt;/h4&gt;

&lt;p&gt;The last modification in the script was to enable it to read emails from the file. This would allow me to test if the variables in the template were substituted correctly. I went with the simple setup once again. &lt;/p&gt;

&lt;p&gt;So, I created a new template file with only a message variable. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8kgjVqdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63kyltkues85lxdm7lfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8kgjVqdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63kyltkues85lxdm7lfw.png" alt="Image description" width="796" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I went back to the &lt;em&gt;tests.py&lt;/em&gt; file and added a &lt;em&gt;with&lt;/em&gt; statement which would be responsible for opening and closing files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;with open('template.html') as file:
    template = file.read()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the &lt;code&gt;format&lt;/code&gt; function, I added the message to the template.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;template = template.format(message=message)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And inserted the template into the sendmail function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server.sendmail(sender_email, receiver_email, template)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whole script will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest
import smtplib
import subprocess
import time

class EmailTestCase(unittest.TestCase):

    def setUp(self):
        self.process = subprocess.Popen(args='exec python -m aiosmtpd -n', shell=True)
        time.sleep(2)

    def test_send_email(self):
        sender_email = "your_email@gmail.com"
        receiver_email = "receiver_email@example.com"
        message = "This is a test email."

        with open('template.html') as file:
            template = file.read()

        template = template.format(message=message)
        with smtplib.SMTP(host="localhost", port=8025) as server:
            server.ehlo()
            server.sendmail(sender_email, receiver_email, template)
            self.assertIsNotNone(server.sock)

    def tearDown(self):
        self.process.kill()
        self.process.wait()

if __name__ == '__main__':
    unittest.main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the code with python test.py and check the output. The message variable was replaced correctly, so the test was successful. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DohBjhnG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyz29ulgjj9fnkyey854.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DohBjhnG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tyz29ulgjj9fnkyey854.png" alt="Image description" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Limitations of this approach
&lt;/h4&gt;

&lt;p&gt;Similar to using aiosmtpd and unit tests, this expanded approach also has its limitations: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doesn’t allow for testing how complex HTML will render on mobile or desktop devices; &lt;/li&gt;
&lt;li&gt;Doesn’t allow for deliverability testing;&lt;/li&gt;
&lt;li&gt;Doesn’t allow for checking client support for HTML emails;&lt;/li&gt;
&lt;li&gt;Doesn’t allow for testing the communication between the script and external mail servers; &lt;/li&gt;
&lt;li&gt;Relies on aiosmtpd and port 8025. Tests may fail if the server isn’t set up correctly. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using the unit test’s mock object library
&lt;/h3&gt;

&lt;p&gt;Another option for testing emails in Python natively is the unit test’s mock object library. It lets you mock the SMTP server connection without sending the emails. &lt;/p&gt;

&lt;p&gt;Here’s the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest
from email.mime.text import MIMEText
from unittest.mock import patch
import smtplib

def send_email(server, port, subject, message, from_addr, to_addr):

    smtp_user = 'username'
    smtp_password = 'password'
    msg = MIMEText(message)
    msg['From'] = from_addr
    msg['To'] = to_addr
    msg['Subject'] = subject
    with smtplib.SMTP(server, port) as server:
        server.starttls()
        server.login(smtp_user, smtp_password)
        server.send_message(msg)
class TestEmailSending(unittest.TestCase):
    @patch('smtplib.SMTP')
    def test_send_email(self, mock_smtp):
        # Arrange: Setup our expectations
        subject = "Test Subject"
        message = "Hello, this is a test."
        from_addr = 'from@example.com'
        to_addr = 'to@example.com'
        server = "sandbox.smtp.mailtrap.io"
        port = 587
        # Act: Call the send_email function
        send_email(server, port, subject, message, from_addr, to_addr)

        # Assert: Check if the right calls were made on the SMTP object
        mock_smtp.assert_called_with(server, port)
        instance = mock_smtp.return_value.__enter__.return_value
        instance.send_message.assert_called_once()
        call_args = instance.send_message.call_args[0]
        sent_email = call_args[0]

        # Verify the email content
        self.assertEqual(sent_email['Subject'], subject)
        self.assertEqual(sent_email['From'], from_addr)
        self.assertEqual(sent_email['To'], to_addr)
        self.assertEqual(sent_email.get_payload(), message)

if __name__ == '__main__':
    unittest.main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The provided code defines a function and includes a test class, &lt;code&gt;TestEmailSending&lt;/code&gt;, using Python’s unit test framework to test this function. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;send_email&lt;/code&gt; function takes server details, subject, message body, sender’s address, and recipient’s address as parameters, creates an email (&lt;code&gt;MIMEText&lt;/code&gt;) object with these details, and then logs into an SMTP server to send it. &lt;/p&gt;

&lt;p&gt;In the test case, the &lt;code&gt;smtplib.SMTP&lt;/code&gt; class is mocked using the u&lt;code&gt;nittest.mock.patch&lt;/code&gt;, allowing the test to verify that the SMTP server is called with the correct parameters without actually sending an email. &lt;/p&gt;

&lt;p&gt;The test checks if the &lt;code&gt;send_message&lt;/code&gt; method of the SMTP instance is called correctly and asserts that the email’s subject, from address, to address, and payload match the expected values.&lt;/p&gt;

&lt;h4&gt;
  
  
  Limitations of this approach
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The mock object library isn’t sufficient for detecting issues with implementation;&lt;/li&gt;
&lt;li&gt;Doesn’t allow for checking client support for HTML emails;&lt;/li&gt;
&lt;li&gt;Doesn’t allow for testing how complex HTML will render on mobile or desktop devices. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to test emails in Python with Mailtrap via SMTP
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1pQJvaF2oTo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;To address the limitations of the native methods, I decided to use &lt;a href="https://dev.toMailtrap%20Email%20Testing"&gt;Mailtrap Email Testing&lt;/a&gt;. It’s an Email Sandbox that provides a safe environment for inspecting and debugging emails in staging, QA, and dev environments. &lt;br&gt;
I used Email Testing to run functional and deliverability tests, check email formatting, analyze the content for spam, check attachments, and test error handling. &lt;/p&gt;

&lt;p&gt;You’ll need an account to use it, and you can quickly create it by opening the &lt;em&gt;&lt;a href="https://mailtrap.io/register/signup?ref=header"&gt;signup page&lt;/a&gt;&lt;/em&gt;. Once the account is up and running, we can go straight to testing. &lt;/p&gt;
&lt;h3&gt;
  
  
  Functional testing
&lt;/h3&gt;

&lt;p&gt;We’ll need a slightly different script in this case. Create a new &lt;code&gt;EmailTestCase&lt;/code&gt; class and add sample data. Here, &lt;code&gt;test_mailtrap&lt;/code&gt; is a method that will send a test email to Mailtrap.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest

class EmailTestCase(unittest.TestCase):

    def test_mailtrap(self):
        sender_email = 'sender@example.com'
        recipient_email = 'recipient@example.com'
        subject = 'Test Email'
        body = 'This is a test email sent from the SMTP server.'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to import the built-in &lt;code&gt;EmailMessage&lt;/code&gt; object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from email.message import EmailMessage 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using it, we’ll build a message and add the sample data to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msg = EmailMessage()
msg['From'] = sender_email
msg['To'] = recipient_email
msg['Subject'] = subject
msg.set_content(body)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last step is to connect to Mailtrap Email Testing’s fake SMTP server. For that, I’ll use smtplib and the with statement. At this point, I’ll need Email Testing’s SMTP credentials. To access them, go to &lt;em&gt;Email Testing&lt;/em&gt; → &lt;em&gt;My Inbox&lt;/em&gt; → &lt;em&gt;SMTP Settings&lt;/em&gt; and click &lt;em&gt;Show Credentials&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OhhCx-Ut--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/noyptlffis314yzrg3k4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OhhCx-Ut--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/noyptlffis314yzrg3k4.png" alt="Image description" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the &lt;em&gt;Host&lt;/em&gt;, &lt;em&gt;Username&lt;/em&gt;, and &lt;em&gt;Password&lt;/em&gt;, and return to the Python project. Create a new instance of the SMTP client and connect to the server using the host and port. &lt;/p&gt;

&lt;p&gt;Call the &lt;code&gt;server.login&lt;/code&gt; method and pass a username and password to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;with smtplib.SMTP(host="sandbox.smtp.mailtrap.io", port=2525) as server:
    server.login(user="your_username", PASSWORD)
    server.send_message(msg)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: Your_username is a placeholder. You should add your actual username here.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;For security reasons, I’ve stored the password in a separate folder. So, I’ll import it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from variables import PASSWORD 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The email-testing script is now ready.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest
import smtplib

from email.message import EmailMessage

from variables import PASSWORD

class EmailTestCase(unittest.TestCase):

    def test_mailtrap(self):
        sender_email = 'sender@example.com'
        recipient_email = 'recipient@example.com'
        subject = 'Test Email'
        body = 'This is a test email sent from the SMTP server.'
        msg = EmailMessage()
        msg['From'] = sender_email
        msg['To'] = recipient_email
        msg['Subject'] = subject
        msg.set_content(body)

        with smtplib.SMTP(host="sandbox.smtp.mailtrap.io", port=2525) as server:
            server.login(user="your_username", PASSWORD)
            server.send_message(msg)

if __name__ == '__main__':
    unittest.main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran the code with the python tests.py command. And the email arrived in the Email Testing inbox within seconds. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AAUc-Qt6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kl8j3mwocoygfohmncdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AAUc-Qt6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kl8j3mwocoygfohmncdf.png" alt="Image description" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test results:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified whether the &lt;code&gt;EmailMessage&lt;/code&gt; object was correctly populated with the sender’s email, recipient’s email address, subject, and body text. I checked the body by going to the &lt;em&gt;Text&lt;/em&gt; tab and verified from, to, and subject from the &lt;em&gt;Tech Info&lt;/em&gt; and &lt;em&gt;Raw&lt;/em&gt; tabs. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9S4OtiSv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bucx0eg3t6z4n13apnpk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9S4OtiSv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bucx0eg3t6z4n13apnpk.png" alt="Image description" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NH32satI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lu03d6siklpts8xsbmxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NH32satI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lu03d6siklpts8xsbmxh.png" alt="Image description" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Revealed that the code established an SMTP connection successfully. &lt;/li&gt;
&lt;li&gt;Revealed that the SMTP authentication process was correct. &lt;/li&gt;
&lt;li&gt;Confirmed that the text message formatting was correct and, as a result, it was successfully sent through the SMTP server.&lt;/li&gt;
&lt;li&gt;Verified that &lt;code&gt;send_message&lt;/code&gt; method of the &lt;code&gt;smtplib.SMTP&lt;/code&gt; class was called with the correct parameters. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Checking email formatting and HTML code
&lt;/h3&gt;

&lt;p&gt;Next up in my tests were: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checking whether the message body in plain text and HTML versions would be the same; &lt;/li&gt;
&lt;li&gt;Checking the mobile, desktop, and tablet previews; &lt;/li&gt;
&lt;li&gt;Analyzing HTML code to see if it contained any unsupported elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For that, I sent a simple HTML email to my virtual inbox using the following lines of code. I used an email-sending script, not a unit test in this case, since the email would still get captured in the inbox. For more information on sending HTML emails from Python, refer to this &lt;a href="https://mailtrap.io/blog/python-send-html-email/"&gt;blog post&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

port = 2525
smtp_server = "sandbox.smtp.mailtrap.io"
login = "your_username"
password = "your_password"

sender_email = "sender@example.com"
receiver_email = "recipient@example.com"
message = MIMEMultipart("alternative")
message["Subject"] = "HTML test"
message["From"] = sender_email
message["To"] = receiver_email

# write the text/plain part
text = """\
Hi,
Check out the new post on the Mailtrap blog:
SMTP Server for Testing: Cloud-based or Local?
https://blog.mailtrap.io/2018/09/27/cloud-or-local-smtp-server/
Feel free to let us know what content would be useful for you!"""

# write the HTML part
html = """\
&amp;lt;html&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;p&amp;gt;Hi,&amp;lt;br&amp;gt;
      Check out the new post on the Mailtrap blog:&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href="https://blog.mailtrap.io/2018/09/27/cloud-or-local-smtp-server"&amp;gt;SMTP Server for Testing: Cloud-based or Local?&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt; Feel free to &amp;lt;strong&amp;gt;let us&amp;lt;/strong&amp;gt; know what content would be useful for you!&amp;lt;/p&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
"""

# convert both parts to MIMEText objects and add them to the MIMEMultipart message
part1 = MIMEText(text, "plain")
part2 = MIMEText(html, "html")
message.attach(part1)
message.attach(part2)

with smtplib.SMTP("sandbox.smtp.mailtrap.io", 2525) as server:
    server.login(login, password)
    server.sendmail(
        sender_email, receiver_email, message.as_string()
    )

print('Sent')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;Test results: *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified that the HTML message wasn’t broken on mobile, desktop, or tablet views. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z48jrrdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ionk1vob6ckvheqknm8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z48jrrdA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ionk1vob6ckvheqknm8i.png" alt="Image description" width="800" height="122"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confirmed that the text content was the same as the HTML content. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B7x8tB4l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sj0j7sdryf9qksavkv2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B7x8tB4l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sj0j7sdryf9qksavkv2t.png" alt="Image description" width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Found out that my email contained one element that email clients would support partially or wouldn’t support at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---m4_RsQR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycmbanyxdqphw5t9wecu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---m4_RsQR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ycmbanyxdqphw5t9wecu.png" alt="Image description" width="800" height="655"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deliverability testing
&lt;/h3&gt;

&lt;p&gt;To extend my tests, I opened the &lt;em&gt;Spam Analysis&lt;/em&gt; tab. This showed the Spam Report with spam score, as well as spam points with descriptions. This is useful for improving the template if it exceeds the threshold of 5. Spam tests are run with the help of the SpamAssassin filter. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test results:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified that the spam score of the email was below the threshold of 5. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5UnTxX51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfahoo2yr1zy864ivfaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5UnTxX51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfahoo2yr1zy864ivfaq.png" alt="Image description" width="800" height="615"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checked the Blacklist Report to see if my domain would be listed in any of the blocklists. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m8Bk5yWV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5j92gbw386j4an224u6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m8Bk5yWV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p5j92gbw386j4an224u6.png" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified that my emails would be delivered to the recipients’ inboxes if I were to send them on prod. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Checking the attachments
&lt;/h3&gt;

&lt;p&gt;I also wanted to see if the email-sending script would attach, encode, and send attachments correctly. Attachments are MIME objects. Encoding implies using a base64 module that encodes all binary data with ASCII characters. &lt;/p&gt;

&lt;p&gt;I simply added Email Testing SMTP credentials to this script and waited for the email to arrive in the virtual inbox.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import smtplib

from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText

port = 2525
smtp_server = "sandbox.smtp.mailtrap.io"
login = "your_username" 
password = "your_password"

subject = "An example of boarding pass"
sender_email = "mailtrap@example.com"
receiver_email = "new@example.com"

message = MIMEMultipart()
message["From"] = sender_email
message["To"] = receiver_email
message["Subject"] = subject

body = "This is an example of how you can send a boarding pass in attachment with Python"
message.attach(MIMEText(body, "plain"))

filename = "yourBP.pdf"

with open(filename, "rb") as attachment:
    part = MIMEBase("application", "octet-stream")
    part.set_payload(attachment.read())

encoders.encode_base64(part)

part.add_header(
    "Content-Disposition",
    f"attachment; filename= {filename}",
)

message.attach(part)
text = message.as_string()

with smtplib.SMTP("sandbox.smtp.mailtrap.io", 2525) as server:
    server.login(login, password)
    server.sendmail(
        sender_email, receiver_email, text
    )
print('Sent')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code snippet sends an email with a PDF attachment. It assumes that the file is located in the same directory in which you run your Python script. The attach method adds the attachment to the message and converts it into a string. &lt;/p&gt;

&lt;p&gt;With a similar method, you could also test other types of attachments. In that case, you should simply use an appropriate class such as &lt;code&gt;email.mime.audio.MIMEAudio&lt;/code&gt; or &lt;code&gt;email.mime.image.MIMEImage&lt;/code&gt;. Read &lt;a href="https://docs.python.org/3/library/email.mime.html"&gt;Python docs&lt;/a&gt; for more information. &lt;/p&gt;

&lt;p&gt;This is what it will look like in the Email Testing inbox. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C6J2ua9v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omr9xgyd200kpu69bk24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C6J2ua9v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omr9xgyd200kpu69bk24.png" alt="Image description" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test results:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified that the script sends an email with an attachment successfully;&lt;/li&gt;
&lt;li&gt;Verified that the file path was configured properly. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Testing error handling
&lt;/h3&gt;

&lt;p&gt;The final test I ran with SMTP was to check error handling. I sent emails using the smtplib module once again, but this time with try and except blocks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import smtplib
from socket import gaierror

port = 2525
smtp_server = "sandbox.smtp.mailtrap.io"
login = "your_username"
password = "your_password"
sender = "sender@example.com"
receiver = "recipient@example.com"
message = f"""\
Subject: Test email
To: {receiver}
From: {sender}

This is my test message with Python."""

try:
    with smtplib.SMTP(smtp_server, port) as server:
        server.login(login, password)
        server.sendmail(sender, receiver, message)
    print('Sent')
except (gaierror, ConnectionRefusedError):
    print('Failed to connect to the server. Bad connection settings?')
except smtplib.SMTPServerDisconnected:
    print('Failed to connect to the server. Wrong user/password?')
except smtplib.SMTPException as e:
    print('SMTP error occurred: ' + str(e))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script will: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Catch &lt;code&gt;gaierror&lt;/code&gt; and &lt;code&gt;ConnectionRefusedError&lt;/code&gt; exceptions if there are issues connecting to the SMTP server;&lt;/li&gt;
&lt;li&gt;Catch &lt;code&gt;smtplib.SMTPServerDisconnected&lt;/code&gt;exception if the server disconnects unexpectedly (when login credentials are invalid, for example);&lt;/li&gt;
&lt;li&gt;Catch &lt;code&gt;smtplib.SMTPException&lt;/code&gt; exception for all the other SMTP errors. &lt;/li&gt;
&lt;li&gt;Print the specific error message received from the server. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/register/signup"&gt;Start Testing Python Emails with Mailtrap&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to test emails in Python with Mailtrap via API
&lt;/h2&gt;

&lt;p&gt;Mailtrap Email Testing also provides an option to test your emails using API. It’s based on REST principles and returns calls as JSON objects. All the details about the Email Testing API are covered in the &lt;a href="https://api-docs.mailtrap.io/docs/mailtrap-api-docs/a2041e813d169-email-testing-api"&gt;API docs&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;To make API requests, you’ll need your API token and inbox ID. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Settings → API Tokens, and click Add Token. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lWFWEBnG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4tc9fr32i880hjoaamr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lWFWEBnG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4tc9fr32i880hjoaamr.png" alt="Image description" width="800" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a token for the desired project and inbox. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vj5JrQIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03rtcs8fxqimnqeaibd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vj5JrQIq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03rtcs8fxqimnqeaibd9.png" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Once the token is ready, go to the desired inbox. Check the URL – the inbox ID is the 7-digit number between inboxes/ and /messages. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yNeOuJDK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ewr3adiwpxx74t5zj9d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yNeOuJDK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ewr3adiwpxx74t5zj9d.png" alt="Image description" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A sample API request looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import http.client

conn = http.client.HTTPSConnection("sandbox.api.mailtrap.io")

payload = "{\n  \"to\": [\n    {\n      \"email\": \"john_doe@example.com\",\n      \"name\": \"John Doe\"\n    }\n  ],\n  \"cc\": [\n    {\n      \"email\": \"jane_doe@example.com\",\n      \"name\": \"Jane Doe\"\n    }\n  ],\n  \"bcc\": [\n    {\n      \"email\": \"james_doe@example.com\",\n      \"name\": \"Jim Doe\"\n    }\n  ],\n  \"from\": {\n    \"email\": \"sales@example.com\",\n    \"name\": \"Example Sales Team\"\n  },\n  \"attachments\": [\n    {\n      \"content\": \"PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCiAgICA8aGVhZD4KICAgICAgICA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+CiAgICAgICAgPG1ldGEgaHR0cC1lcXVpdj0iWC1VQS1Db21wYXRpYmxlIiBjb250ZW50PSJJRT1lZGdlIj4KICAgICAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCI+CiAgICAgICAgPHRpdGxlPkRvY3VtZW50PC90aXRsZT4KICAgIDwvaGVhZD4KCiAgICA8Ym9keT4KCiAgICA8L2JvZHk+Cgo8L2h0bWw+Cg==\",\n      \"filename\": \"index.html\",\n      \"type\": \"text/html\",\n      \"disposition\": \"attachment\"\n    }\n  ],\n  \"custom_variables\": {\n    \"user_id\": \"45982\",\n    \"batch_id\": \"PSJ-12\"\n  },\n  \"headers\": {\n    \"X-Message-Source\": \"dev.mydomain.com\"\n  },\n  \"subject\": \"Your Example Order Confirmation\",\n  \"text\": \"Congratulations on your order no. 1234\",\n  \"category\": \"API Test\"\n}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Api-Token': "your_api_token"
}

conn.request("POST", "/api/send/your_inbox_id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once again, examine the API docs and &lt;a href="https://api-docs.mailtrap.io/docs/mailtrap-api-docs/bcf61cdc1547e-send-email-early-access"&gt;this page&lt;/a&gt;, in particular, to learn how to send API requests in Python (or other languages), send a sample request, and check out the sample response. &lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Python’s native methods are sufficient to test email-sending and run other functional tests. However, to check the spam score, the connection with external servers, or HTML/CSS, you’ll need a dedicated testing tool such as Mailtrap Email Testing. &lt;/p&gt;

&lt;p&gt;If you want to learn more about email-sending and testing in Python, then check out our blog posts: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/python-send-email/"&gt;How to Send an Email in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/python-send-email-gmail/"&gt;How to Send Emails in Python with Gmail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/python-validate-email/"&gt;Python Options to Validate Email&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/python-mail-merge/"&gt;Mail Merge with Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;H&lt;a href="https://mailtrap.io/blog/yagmail-tutorial/"&gt;ow to Send an Email With Yagmail&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ve also covered sending emails in popular Python frameworks, such as &lt;a href="https://mailtrap.io/blog/django-send-email/"&gt;Django&lt;/a&gt; and &lt;a href="https://mailtrap.io/blog/flask-email-sending/"&gt;Flask&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Keep an eye on our blog as we publish more testing topics, such as how to test emails, email testing for beginners, email sandboxing, and others. &lt;/p&gt;

&lt;p&gt;Don’t let Python’s snake crush your emails. Good luck!&lt;/p&gt;

&lt;p&gt;Thank you for reading this article! Learn &lt;a href="https://mailtrap.io/blog/python-test-email/"&gt;how to test emails in Python&lt;/a&gt; with Mailtrap blog!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Send Emails in Salesforce</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Mon, 25 Dec 2023 09:28:03 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/how-to-send-emails-in-salesforce-bjl</link>
      <guid>https://forem.com/ketbostoganashvili/how-to-send-emails-in-salesforce-bjl</guid>
      <description>&lt;p&gt;As a robust CRM platform, Salesforce enables users to send all sorts of emails from its platform, from customer service emails to full-blown automated marketing campaigns. &lt;/p&gt;

&lt;p&gt;However, it can be a bit hard to figure out which method you should be using. Should you send emails with Gmail or Yahoo? Should you use an Email Relay? Maybe you should build Flows and send automated emails? &lt;/p&gt;

&lt;p&gt;In today’s comprehensive guide, we answer all these (and some other) questions and provide a step-by-step tutorial on sending emails from Salesforce. &lt;/p&gt;

&lt;h2&gt;
  
  
  Email sending limits in Salesforce
&lt;/h2&gt;

&lt;p&gt;Salesforce has several sending limitations based on the type of account and plan you’re using. &lt;/p&gt;

&lt;h3&gt;
  
  
  Sending limits for licensed orgs
&lt;/h3&gt;

&lt;p&gt;Each licensed Salesforce org (i.e., orgs using the paid services) is allowed to send single emails to up to 5,000 external email addresses per day. The daily email limit is based on GMT and is renewed after midnight. By ‘external’ emails, Salesforce means any addresses not associated with a Contact, User, or Lead. The same limitation applies while sending mass or list emails. &lt;/p&gt;

&lt;p&gt;For orgs registered before Spring 2019, the daily limit is enforced only when using Apex or Salesforce APIs with the exception of REST APIs. &lt;/p&gt;

&lt;p&gt;For orgs registered in Spring 2019 or later, the daily limit also applies to emails sent through email alerts, simple email actions, Send Email actions, and REST API. &lt;/p&gt;

&lt;p&gt;Additionally, each user in the org has their own hourly limits – they can send emails to up to 250 external recipients per hour. &lt;/p&gt;

&lt;p&gt;Do keep in mind that each email address in the ‘To’, ‘Cc’, and ‘Bcc’ fields counts as a separate call while sending emails from Apex or API. So, if you had one address in each, it would count as three emails. &lt;/p&gt;

&lt;p&gt;If you attempt to send emails after reaching this limit, you’ll encounter an error (SINGLE_EMAIL_LIMIT_EXCEEDED). &lt;/p&gt;

&lt;p&gt;For more details, refer to the &lt;a href="https://help.salesforce.com/s/articleView?id=sf.allocations_email_general.htm&amp;amp;type=5" rel="noopener noreferrer"&gt;official Salesforce documentation&lt;/a&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Sending limits for developer and trial accounts
&lt;/h3&gt;

&lt;p&gt;Developer Edition and trial orgs have less generous daily limits. Each user can send emails to up to 50 recipients per day, with each email having a maximum of 15 recipients per day. Up to 10 recipients per day are allowed if you’re sending a List Email or Mass Email. &lt;/p&gt;

&lt;p&gt;Also, you can have only 15 recipients per day in workflows. &lt;/p&gt;

&lt;p&gt;These limits apply to user-to-user, Apex, workflow, mass, and single emails. &lt;/p&gt;

&lt;h2&gt;
  
  
  How to send email in Salesforce
&lt;/h2&gt;

&lt;p&gt;There are multiple email-sending configurations both in Salesforce Classic and Salesforce Lightning Experience. These configurations vary based on the email service provider or &lt;a href="https://mailtrap.io/blog/email-infrastructure/" rel="noopener noreferrer"&gt;email infrastructure&lt;/a&gt; you’re using. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to send emails through external email services
&lt;/h3&gt;

&lt;p&gt;The easiest way to send emails from Salesforce is via Gmail or Microsoft 365 (labeled as Office 365 in the UI). You can switch on sending directly from the platform without having to go back and forth between your Gmail/Microsoft 365 and Salesforce accounts. &lt;/p&gt;

&lt;p&gt;For all the instructions below, we’ll assume you’ve already set up Salesforce account. If not, go to salesforce.com, choose the desired subscription, and fill out the registration form (or contact support, depending on the product you’re choosing). &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The following steps apply to both Lightning Experience and Classic versions.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Sign into your Salesforce account and navigate to &lt;em&gt;Setup&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvouy2qaouo6g8luh0359.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvouy2qaouo6g8luh0359.png" alt=" " width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Quick Find box, type in Send through External Email Services, hit enter, and click on the search result. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwiwm5g8wrsgwbb8csx3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwiwm5g8wrsgwbb8csx3u.png" alt="Send through External Email Services in Lightning Experience" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0g7jwk6211l0qkjokxh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0g7jwk6211l0qkjokxh.png" alt="Send through External Email Services in Salesforce Classic" width="714" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Toggle either Gmail or Office 365, depending on which one you will use. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7swh9lorizivqtexwyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7swh9lorizivqtexwyi.png" alt="Configuring external email services in Lightning Experience" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63fihcv3h4afhdwsoevz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63fihcv3h4afhdwsoevz.png" alt="Configuring external email services in Salesforce Classic" width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then head over to the &lt;em&gt;Deliverability&lt;/em&gt; under &lt;em&gt;Email (Email Administration in Classic)&lt;/em&gt; in &lt;em&gt;Setup&lt;/em&gt; and set &lt;em&gt;Access to Send Email (All Email Services)&lt;/em&gt; to &lt;em&gt;All Email&lt;/em&gt;. This will allow you to send all types of outbound emails. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfepnszcik8efro7vika.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgfepnszcik8efro7vika.png" alt="Configuring deliverability in Lightning Experience" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F954dzxs2svdx2t43uadv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F954dzxs2svdx2t43uadv.png" alt="Configuring deliverability in Salesforce Classic" width="800" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To configure email settings, go to Settings → My Email Settings. There, modify the sender name or set the email signature. You can also toggle between Send through Salesforce and Send through Gmail/Office 365 features. Once you’re done, click Save. &lt;/p&gt;

&lt;p&gt;Note: The ability to change the sender name is only available for Gmail users. If you’re using Office 365, you won’t be able to access this feature. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvjfnykaxewji2qy5lvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvjfnykaxewji2qy5lvp.png" alt="Configuring email settings in Salesforce Lightning Experience" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrdbzuz4vpvvhunjnjv1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrdbzuz4vpvvhunjnjv1.png" alt="Configuring email settings in Salesforce Classic" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, choose a contact to send an individual email or select a template. We go over different sending cases below. &lt;/p&gt;

&lt;p&gt;Tip: Use Salesforce integration with Outlook and Gmail for seamless synchronization between the platforms. You’ll learn how to handle the setup &lt;a href="https://mailtrap.io/blog/salesforce-email-integration/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;A couple of things to keep in mind: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you’re using Communities, you won’t be able to send emails with Gmail or Office 365. &lt;/li&gt;
&lt;li&gt;This feature isn’t available for Einstein Activity Capture and Salesforce Inbox users either. &lt;/li&gt;
&lt;li&gt;The emails you send through Gmail and Office 365 won’t be stored in Salesforce email logs, making it harder to track email delivery and deliverability. However, you can still access them in your email client or Gmail/Office 365 accounts. &lt;/li&gt;
&lt;li&gt;You can’t send emails from organization-wide email addresses with Gmail or Office 365. They are usually sent through Salesforce. &lt;/li&gt;
&lt;li&gt;Bounce management isn’t available with this feature. &lt;/li&gt;
&lt;li&gt;List emails and emails sent by triggers and workflow rules are sent from Salesforce, not from Gmail or Office 365. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to send emails with your own domain and Salesforce
&lt;/h2&gt;

&lt;p&gt;To sidestep the limitations of the Send through External Email Services feature, you can send emails directly from Salesforce. However, this functionality only works if you have your own domain. You could use Gmail, Outlook, or Yahoo/AOL accounts, but you’d still have to get a custom domain. &lt;/p&gt;

&lt;p&gt;If you send emails directly from Salesforce, you’ll be leveraging the email servers provided by the platform itself. &lt;/p&gt;

&lt;p&gt;To enable it, head over to Setup → Email → Deliverability. Under the Email Security Compliance (Emails from Salesforce or Email Relay Only) tab, untick the box next to Enable compliance with standard email security mechanisms and Enable Sender ID Compliance. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmtsfw3ihdmges5czzn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmtsfw3ihdmges5czzn5.png" alt="Configuring deliverability settings in Lightning Experience" width="800" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F198qqjjrc5hydzz5pbn2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F198qqjjrc5hydzz5pbn2.png" alt="Configuring deliverability settings in Salesforce Classic" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add Salesforce’s SPF record in the DNS records of your sending domain. For that, you’ll need access to the DNS control panel or the management console. The particular steps vary depending on your hosting provider so make sure you check their documentation for detailed instructions. Additional Salesforce-specific information is also available &lt;a href="https://help.salesforce.com/s/articleView?id=000382664&amp;amp;type=1" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The final step is to set up Secure DKIM keys. This will ensure better &lt;a href="https://mailtrap.io/blog/email-deliverability/" rel="noopener noreferrer"&gt;email deliverability&lt;/a&gt; i.e., &lt;a href="https://mailtrap.io/blog/salesforce-email-going-to-spam/" rel="noopener noreferrer"&gt;prevent email from going to spam&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Go to Setup and type DKIM keys in the quick find box. Click Create New Key. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv40xei9ymcrq5pixey4g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv40xei9ymcrq5pixey4g.png" alt="Secure DKIM Keys in Lightning Experience" width="800" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmir892amqo4491z64cym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmir892amqo4491z64cym.png" alt="Secure DKIM Keys in Salesforce Classic" width="800" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose the size of the RSA key. It’s recommended to use 2048-bit for more security, but you can use 1080-bit depending on the email recipients’ limitations. &lt;/p&gt;

&lt;p&gt;Then enter unique values in the Selector and Alternate Selector fields. The latter will allow Salesforce to rotate your keys automatically. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgpi3qkdq7ip2m23nfza.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgpi3qkdq7ip2m23nfza.png" alt=" " width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The instructions on creating a DKIM key can be found here. Alternatively, read our blog post for more information or watch the &lt;a href="https://youtu.be/jy6YMzQZTz8" rel="noopener noreferrer"&gt;video&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Enter the domain name and configure the Domain Match Pattern. The pattern determines at what level the DKIM signature should be matched: domain, subdomain, or both. It should be a comma-separated list. For example, the pattern example.com,*.example.com will match at the domain and subdomain level. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6gtvxmp7xuis6gbd0zaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6gtvxmp7xuis6gbd0zaf.png" alt=" " width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Save. At this point, Salesforce will publish your TXT records to DNS. Publication may take some time. Once it’s complete, you’ll be able to see your CNAME and alternate CNAME on the DKIM Key Details page. &lt;/p&gt;

&lt;p&gt;Publish CNAME and alternate CNAME to your domain’s DNS and activate the DKIM keys from the DKIM Key Details page. &lt;/p&gt;

&lt;p&gt;After that, you’ll be able to send emails from Salesforce Lightning Experience and Salesforce Classic with your own domain. &lt;/p&gt;

&lt;h3&gt;
  
  
  How to send an email from Salesforce with a third-party SMTP server and Email Relay
&lt;/h3&gt;

&lt;p&gt;Salesforce also has an &lt;a href="https://mailtrap.io/blog/salesforce-email-relay/" rel="noopener noreferrer"&gt;Email&lt;/a&gt; &lt;a href="https://mailtrap.io/blog/salesforce-email-relay/" rel="noopener noreferrer"&gt;Relay&lt;/a&gt; feature that allows users to route their emails through the desired sending provider’s SMTP server or leverage any other SMTP server. &lt;/p&gt;

&lt;p&gt;Opting for a reliable email service provider (ESP) is a good idea if you want to ensure high deliverability rates and send emails without volume restrictions. This is important whether you’re sending &lt;a href="http://mailtrap.io/blog/email-marketing" rel="noopener noreferrer"&gt;email marketing&lt;/a&gt; campaigns, mass emails, or vital transactional emails. &lt;/p&gt;

&lt;p&gt;One such option is &lt;a href="https://mailtrap.io/email-sending/" rel="noopener noreferrer"&gt;Mailtrap Email Sending&lt;/a&gt; – an infrastructure with high deliverability rates offering both SMTP and Email API services. Thanks to its smooth SMTP integration, you can easily add it to your Salesforce platform. &lt;/p&gt;

&lt;p&gt;Of course, you’ll need to create an account to get started. Go to the sign-up page and follow the simple steps to register and add your domain. More instructions are available in the Getting Started Guide. &lt;/p&gt;

&lt;p&gt;Note: You should verify your domain to start sending emails. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2qs6pcn4ebzlne27tvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2qs6pcn4ebzlne27tvs.png" alt=" " width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once your Email Sending account is up and running, go to the Sending Domains tab and click on your domain. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vjdsrooies2twr6z42e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7vjdsrooies2twr6z42e.png" alt=" " width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the API and SMTP tab and select SMTP to reveal your SMTP credentials. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foutujqz3p7dd5m7s69zx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foutujqz3p7dd5m7s69zx.png" alt=" " width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now return to Salesforce and go to Setup  → Email (under Administration) → Email Delivery Settings → Email Relays.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppnyekz6soe2aqn9oc9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fppnyekz6soe2aqn9oc9e.png" alt="Email Relay in Lightning Experience" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flryqtbvqvbjywfkrpnfn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flryqtbvqvbjywfkrpnfn.png" alt="Email Relay in Salesforce Classic" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Create Email Relay and fill out the empty fields with Email Sending’s SMTP credentials as shown in the screenshot below: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx3nua4jp1kq5m89flil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx3nua4jp1kq5m89flil.png" alt=" " width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tick the box next to Enable SMTP Auth, choose the authentication method (plain or login), and enter your SMTP username and password. Click Save. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimbnbkr4m256apsmwebl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimbnbkr4m256apsmwebl.png" alt=" " width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, navigate to Email Domain Filters and press Create Email Domain Filter, otherwise your relay won’t be activated. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcov1kttdzfxxl3fsybrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcov1kttdzfxxl3fsybrz.png" alt="Email Domain Filter in Lightning Experience" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0ew640hxfb17wl3krec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0ew640hxfb17wl3krec.png" alt="Email Domain Filter in Salesforce Classic" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the Sender Domain and Recipient Domain fields, enter ‘*’ as the default wildcard. Tick the box next to Active and click Save. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F414pwh8rqwp3713ebl96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F414pwh8rqwp3713ebl96.png" alt=" " width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can send emails with Mailtrap Email Sending’s SMTP server. In the email-sending options in the following sections, we’ll be using Mailtrap’s configuration. &lt;/p&gt;

&lt;p&gt;After sending a test email, click Verify Setup in the API and SMTP tab in Email Sending and you’ll be all set. Then, analyze the performance of your emails with the Actionable Analytics feature with stats for categories and mailbox providers. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbiegr95m75axckdr3ld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbiegr95m75axckdr3ld.png" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to send different emails in Salesforce Lightning Experience
&lt;/h2&gt;

&lt;p&gt;In Lightning Experience, you have multiple options to send emails depending on your usage of the platform, including sending emails from a record, using merge fields with email templates, adding attachments, and sending emails from action. Let’s go over each use case. &lt;/p&gt;

&lt;h3&gt;
  
  
  Sending an email from a Salesforce record
&lt;/h3&gt;

&lt;p&gt;Lightning Experience enables you to send emails directly from the record you’re on. You can use this option to contact existing customers or anyone in your system who has a valid email address. With this method, you can send rich or plain text emails using email templates or by compiling them manually. It’s also possible to add attachments, images, and links. &lt;/p&gt;

&lt;p&gt;To get started, navigate to the record you want to send an email from. This can be an account, contact, lead, opportunity, case, or even a custom object.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbz9g3kbsxydizj4bopuw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbz9g3kbsxydizj4bopuw.png" alt=" " width="800" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the record and locate Email in the Activity tab. Press a downward arrow to choose email-sending options (Gmail or Outlook) or click on the Email button directly if your configurations are already set. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6aljrw0qscgzlvxj0az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6aljrw0qscgzlvxj0az.png" alt=" " width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A simple email editor will pop up. Insert a Lightning email template or create a custom email message. You’ll find more information about available templates and instructions on using email template builder here. &lt;/p&gt;

&lt;p&gt;To verify the details of the contact or account, you can scroll the record page without closing the editor. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g38lobwz2i54oqef17n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g38lobwz2i54oqef17n.png" alt=" " width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you decide to use templates, add attachments or images, preview the email before sending it. That way, you’ll verify merge fields and ensure everything looks as expected. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzxzp07p9ei6ywp80exh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmzxzp07p9ei6ywp80exh.png" alt=" " width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you’re done compiling the email, click Send. If you have Automatic Bcc enabled in My Email Settings, you’ll immediately receive a copy of the message to the indicated return address. The email log will also appear in the Activity tab of the record you sent an email to and in the related records (such as an account, for example). &lt;/p&gt;

&lt;p&gt;To track the engagement (email open and click rates, conversions, bounce rates, etc.) and analyze the results of your campaigns, you should enable email tracking in your org. Go to Setup → Activity Settings and mark the checkbox next to Enable Email Tracking. Save the settings and you’ll be good to go. Read our &lt;a href="https://mailtrap.io/blog/salesforce-email-tracking/" rel="noopener noreferrer"&gt;dedicated blog post&lt;/a&gt; for more information on email tracking options in various Salesforce editions. &lt;/p&gt;

&lt;h3&gt;
  
  
  Sending emails from Email Quick Actions
&lt;/h3&gt;

&lt;p&gt;Salesforce Lightning Experience streamlines the email-sending process for sales reps with the help of email quick actions. These allow you to create custom actions, predefine fields, and send emails without having to fill out field values manually. &lt;/p&gt;

&lt;p&gt;If you don’t have email action, you can create it using the instructions below. If you already have one, a custom email quick action can be added for a specific account, opportunity, or business event. &lt;/p&gt;

&lt;p&gt;Navigate to Setup → Global Actions and click the New Action button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4yrdxubmy8whqhk1uqvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4yrdxubmy8whqhk1uqvb.png" alt=" " width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose Send Email as the Action type and Email as the Standard Label Type. Come up with a unique name for the action to avoid errors while executing API calls. Click Save.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrmk83spgqqbycstc3y4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrmk83spgqqbycstc3y4.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A page layout editor window will appear. You can either accept the default configuration or adjust the properties for each field manually. Once you’re done, click Save. &lt;/p&gt;

&lt;p&gt;Go to a record to check if the newly-created quick action is in place. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmo35zpn5c23110w46kl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmo35zpn5c23110w46kl7.png" alt=" " width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To automate processes even more, it’s possible to create predefined field values, such as To, Cc, or Bcc. &lt;/p&gt;

&lt;p&gt;Navigate to Global Actions in Setup once again, open the email action you want to edit, and click New under Predefined Field Values. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xrbamrj36yt0eyipuhi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xrbamrj36yt0eyipuhi.png" alt=" " width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select To, Cc, or Bcc in the Field Name dropdown menu. Use the formula editor and JUNCTIONIDLIST function to associate the selected field with a Salesforce record. Click Save. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flthkww8z0l1lpmohegra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flthkww8z0l1lpmohegra.png" alt=" " width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: JUNCTIONIDLIST is only necessary when using values with multiple IDs. &lt;/p&gt;

&lt;p&gt;That’s it. When you create a new email, the From (filled automatically by Salesforce) and To fields will be automatically defined. Then you can send emails as we did in the previous section.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to send emails in Salesforce Classic
&lt;/h2&gt;

&lt;p&gt;Similar to Lightning Experience, Salesforce Classic also enables you to send a single email message from a particular record. &lt;/p&gt;

&lt;p&gt;Open a specific record such as a contact, account, lead, opportunity, etc., and go to Activity History. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fubndws0vmdp0lbdl7aue.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fubndws0vmdp0lbdl7aue.png" alt=" " width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press the Send an Email button to open the email composer. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa001ph90vzlleyy0xciu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa001ph90vzlleyy0xciu.png" alt=" " width="800" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose between text and HTML editors and fill in the empty fields. Craft the email content manually or use one of the Salesforce Classic templates. You could also send emails with attachments from here. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbczej4fezpxqvwjwhs69.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbczej4fezpxqvwjwhs69.png" alt=" " width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Send and check the email in your inbox if you defined the Bcc field. &lt;/p&gt;

&lt;p&gt;Remember that Email Composer takes note of the opt-outs. If you attempt to send an email to an unsubscribed user, you’ll see a warning message. However, this rule doesn’t apply to Additional To, Cc, and Bcc fields.&lt;/p&gt;

&lt;p&gt;Thank you for reading this part of the article! Read full version in Mailtrap blog and discover &lt;a href="https://mailtrap.io/blog/salesforce-send-email/" rel="noopener noreferrer"&gt;how to send email using trigger in salesforce&lt;/a&gt;!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>13 Reasons &amp; Solutions for Why Your Emails Are Going to Spam</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Wed, 20 Dec 2023 11:04:46 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/13-reasons-solutions-for-why-your-emails-are-going-to-spam-5ece</link>
      <guid>https://forem.com/ketbostoganashvili/13-reasons-solutions-for-why-your-emails-are-going-to-spam-5ece</guid>
      <description>&lt;p&gt;Have you fallen victim to the poor judgment of spam filter algorithms? No, this isn’t an ad run by an insurance company. Instead, this is the reality faced by email marketers and software engineers worldwide who put lots of effort and thought into their campaigns just to see them end up in the spam folder.&lt;/p&gt;

&lt;p&gt;Once in the spam folder, an email is likely to never be seen by the eyes of its intended recipients unless they are rummaging through the folder in search of some lost password recovery email.&lt;/p&gt;

&lt;p&gt;So, why are your emails going to spam, and what can you do to prevent that from happening? We tackle both of these topics here, so keep on reading!&lt;/p&gt;

&lt;h2&gt;
  
  
  You lack proper authentication
&lt;/h2&gt;

&lt;p&gt;Email authentication is what helps distinguish between emails that are legitimate and those that are spam. So, if said authentication is missing, you, as a sender, seem less trustworthy, and on top of that, your domain name is more prone to being used by spammers and scammers to send deceptive emails.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication (DMARC) authentication methods.&lt;/li&gt;
&lt;li&gt;Monitor your authentication results and correct things if needed.&lt;/li&gt;
&lt;li&gt;Keep up with the latest updates and policies in email security.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You use spammy words
&lt;/h2&gt;

&lt;p&gt;It’s no secret that each of your outgoing emails, be it a marketing email or a transactional email, is checked by spam filters set up by Internet service providers (ISPs) and email service providers (ESPs) such as Gmail, Yahoo, Microsoft Outlook, etc. These filters are built to look for specific words and word combinations often used by spammers and flag emails containing them in their body or subject line. &lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Avoid using all capital letters, excessive exclamation marks, emojis, and numbers/numeric characters, as well as unnecessary spaces and punctuation, and heavily sales-oriented language. &lt;/li&gt;
&lt;li&gt;Avoid common spam trigger words such as free, lowest price, easy money, etc.&lt;/li&gt;
&lt;li&gt;Keep an eye on your grammar and spelling.&lt;/li&gt;
&lt;li&gt;Don’t exaggerate your claims and promises.&lt;/li&gt;
&lt;li&gt;Keep your language somewhat neutral.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You include suspicious attachments and links
&lt;/h2&gt;

&lt;p&gt;As email attachments are often the source of malware, spam filters take a close look at them, especially if they are executable files (.exe). Other file types, such as ZIP files, macro-enabled Office files, and even PDFs, can also contain malicious code or phishing links and are thus seen as red flags.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run scans on attachments before uploading them to make sure they are free from malware.&lt;/li&gt;
&lt;li&gt;Consider using a secure file transfer service instead of adding your file as an attachment.&lt;/li&gt;
&lt;li&gt;Steer completely clear from using suspicious file types.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You have inaccurate “FROM” information
&lt;/h2&gt;

&lt;p&gt;The “FROM” line of an email should contain accurate information about who the email sender is. When it comes to spam emails, misleading information is often put in this field to trick the recipient. With that said, it’s clear why inaccurate “FROM” information could be the culprit for why your emails are being marked as spam.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use a recognizable sender name and a valid email address associated with your domain.&lt;/li&gt;
&lt;li&gt;Maintain consistency of the “FROM” field across your email communications.&lt;/li&gt;
&lt;li&gt;Follow proper procedures for updating the “FROM” field information when necessary.&lt;/li&gt;
&lt;li&gt;Monitor your “FROM” filed information, especially if you use automated systems and third-party platforms.&lt;/li&gt;
&lt;li&gt;Ensure contact forms on your website use the admin address of your site in the “FROM” field instead of the addresses entered into them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You lack permission to email people
&lt;/h2&gt;

&lt;p&gt;GDPR, the CAN-SPAM Act, and other rules and regulations strictly prohibit sending unsolicited emails. What’s more, unsolicited emails are more than likely to be reported by recipients as they are a form of unwanted communication. So if your email list partially or completely consists of email addresses you purchased or simply didn’t obtain organically, then the messages you send to those addresses will end up being flagged as spam, not by spam filters but by the recipients themselves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Check if all the people on your email list have given you explicit consent to send them emails and remove those who have not.&lt;/li&gt;
&lt;li&gt;Use an opt-in form when collecting email addresses and include a disclaimer stating that you will be using this information and how.&lt;/li&gt;
&lt;li&gt;Take things a step further by using a double opt-in and asking for an email address confirmation upon sign-up.&lt;/li&gt;
&lt;li&gt;Keep your privacy policy updated, especially on the aspect of email address collection and storage.&lt;/li&gt;
&lt;li&gt;Make unsubscribing easy and effortless.&lt;/li&gt;
&lt;li&gt;Educate team members with access to your email list on laws and regulations related to email sending.&lt;/li&gt;
&lt;li&gt;Seek legal advice if you have trouble understanding and complying with laws and regulations related to email sending. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You have a poor sender reputation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/blog/email-sender-reputation/" rel="noopener noreferrer"&gt;Sender reputation&lt;/a&gt; is made up of domain and IP address reputation and plays a crucial role in &lt;a href="https://mailtrap.io/blog/email-deliverability/" rel="noopener noreferrer"&gt;email deliverability&lt;/a&gt;. So, if either of these metrics is not looking good in your case, then it will be unlikely that you’ll be seen as a reputable sender and that your emails will end up in recipients’ inboxes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Authenticate your domain.&lt;/li&gt;
&lt;li&gt;Check your blacklist presence and request removal if necessary.&lt;/li&gt;
&lt;li&gt;Grow your email list organically.&lt;/li&gt;
&lt;li&gt;Clean your email list from inactive and unengaged email accounts/subscribers.&lt;/li&gt;
&lt;li&gt;Keep a close eye on bounce rates and remove bounced email addresses from your list.&lt;/li&gt;
&lt;li&gt;Work on improving engagement.&lt;/li&gt;
&lt;li&gt;Sign up for a feedback loop to receive notifications of spam complaints.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You are being marked as spam by recipients (maybe accidentally)
&lt;/h2&gt;

&lt;p&gt;Besides spam filters, email recipients also have the ability to mark an email as spam. This could happen for a number of reasons and even in situations where you know your content is good and you have all the necessary permissions. If this becomes a common occurrence with your email subscribers, you might start being seen as a suspicious sender, thus preventing your emails from reaching the recipients who, in fact, want to be contacted by you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Commit to always providing relevant, clear, and overall top-notch content in the email.&lt;/li&gt;
&lt;li&gt;Segment your email list and send targeted email campaigns to each segment.&lt;/li&gt;
&lt;li&gt;Ensure unsubscribing is easy and effortless.&lt;/li&gt;
&lt;li&gt;Use a double opt-in form for subscribing to your email list.&lt;/li&gt;
&lt;li&gt;Regularly clean your list from inactive and unengaged subscribers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You mislead with your subject lines
&lt;/h2&gt;

&lt;p&gt;Grabbing attention is the number one task of email subject lines. Still, in order to adhere to laws and regulations such as CAN-SPAM, these subject lines need to be honest and not intentionally mislead a recipient into opening a message. Examples of intentional misleading include falsely using “RE” or “FW” in the subject line of an email that isn’t a reply or a forwarded message, being overly personal with your language, making overly sensational claims, etc.&lt;/p&gt;

&lt;p&gt;Solutions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use language that’s clear and straightforward.&lt;/li&gt;
&lt;li&gt;Don’t misuse symbols such as “RE” and “FW”.&lt;/li&gt;
&lt;li&gt;Always maintain a level of professionalism and avoid being too informal and personal.&lt;/li&gt;
&lt;li&gt;Base your subject lines on facts and avoid sensational or clickbait language.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You have low engagement rates
&lt;/h2&gt;

&lt;p&gt;Engagement, more specifically, open rate, click rate, replies, and so on, is one of the factors taken into account when deciding whether your email will be classified as spam or legitimate. So, if you see your engagement rates dropping, it shouldn’t come as much of a surprise if more and more of your emails end up in spam.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Segment your email list based on demographics, behavior, etc.&lt;/li&gt;
&lt;li&gt;Personalize emails and tailor content within them to recipient interests and preferences.&lt;/li&gt;
&lt;li&gt;Optimize subject lines to be compelling and concise.&lt;/li&gt;
&lt;li&gt;Work on improving your email content so it’s more relevant and valuable.&lt;/li&gt;
&lt;li&gt;Determine the best days and times to send your emails.&lt;/li&gt;
&lt;li&gt;Clean your list from inactive and unengaged subscribers.&lt;/li&gt;
&lt;li&gt;Conduct A/B testing for different email elements.&lt;/li&gt;
&lt;li&gt;Run engagement surveys to collect subscriber preferences.&lt;/li&gt;
&lt;li&gt;Run re-engagement campaigns.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You don’t follow HTML email best practices
&lt;/h2&gt;

&lt;p&gt;To make your content more eye-catching and engaging, switching from plain-text to HTML emails is inevitable, as these types of emails enable you to include things such as branding elements, CTAs, visuals, etc. But, if the HTML code in the emails isn’t carefully put together, it could trigger spam filters.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use a responsive design.&lt;/li&gt;
&lt;li&gt;Write/use clean HTML code without deprecated elements.&lt;/li&gt;
&lt;li&gt;Stay away from excessive styling using CSS and avoid JavaScript.&lt;/li&gt;
&lt;li&gt;Optimize images used within emails.&lt;/li&gt;
&lt;li&gt;Provide images with an alt text.&lt;/li&gt;
&lt;li&gt;Include a text-only version of your email.&lt;/li&gt;
&lt;li&gt;Maintain a low image-to-text ratio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You have a bad email list
&lt;/h2&gt;

&lt;p&gt;A spammer’s email list is most certainly a collection of any and all email addresses they can find, including valid and invalid ones. However, the inevitable results of using such lists are a high bounce rate, low engagement, and frequent spam reports. Taking that into consideration, if your list is not a clean one, you might be seen as a spammer, as the negative effects are bound to start manifesting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Only add the email addresses of people who agreed to receive communication from you to your list.&lt;/li&gt;
&lt;li&gt;Never resort to buying or borrowing an email list.&lt;/li&gt;
&lt;li&gt;Clean the list of unsubscribed, inactive, and unengaged recipients.&lt;/li&gt;
&lt;li&gt;Use an email verification service or software to validate email addresses.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You aren’t allowing subscribers to opt-out easily
&lt;/h2&gt;

&lt;p&gt;If you’re an email marketer that follows outlined rules and regulations, then you should be aware of the requirement to include an unsubscribe option in each email you send. But along with doing that, you should also make sure said option is easy to spot within the email. If this is not the case, email recipients could be left frustrated and mark the email as spam.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Place a clear and visible unsubscribe link in a prominent spot within the header or footer.&lt;/li&gt;
&lt;li&gt;Make the unsubscribe a single-click action.&lt;/li&gt;
&lt;li&gt;Use a large and bold font as well as color and styling that stands out.
Use simple phrases such as “Unsubscribe here” that aren’t in any way confusing.&lt;/li&gt;
&lt;li&gt;Implement a confirmation mechanism that notifies that the unsubscription was successful.&lt;/li&gt;
&lt;li&gt;Implement a preferences center allowing subscribers to manage their email preferences instead of unsubscribing.&lt;/li&gt;
&lt;li&gt;Process the unsubscription within the time period listed in the laws and regulations you adhere to. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  You haven’t included your physical address
&lt;/h2&gt;

&lt;p&gt;Although surprising, the lack of a physical address in your email might be a red flag and have the email marked as spam. The purpose of this physical address is to add an element of traceability and make you seem like more of a legitimate business.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solutions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Decide what your physical address will be – you can go for your street address, a post box registered with the postal service, or a private mailbox registered with an agency for receiving mail, depending on your business setup.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Format the address so it’s clear and legible following the example below:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your Company Name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Street Address&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;City, State Zip Code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Country (if applicable)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update your email signature by placing the address there.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add contact information along with your physical address so recipients can reach you in multiple ways.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information on email deliverability, check out our dedicated video:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ChZPiukIpy8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid spam filters: Use Mailtrap's proficient email infrastructure
&lt;/h2&gt;

&lt;p&gt;After reading this article, you should now be quite familiar with the ways you might trigger spam filters as well as why recipients might mark your emails as spam. You should also know all the actions you can take to fix the situation once you’ve realized that your emails aren’t hitting inboxes. &lt;/p&gt;

&lt;p&gt;Then, you can freely proceed to send those emails using a solution like &lt;a href="https://mailtrap.io/email-sending/" rel="noopener noreferrer"&gt;Mailtrap Email Sending&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This solution is designed to provide an &lt;a href="https://mailtrap.io/blog/email-infrastructure/" rel="noopener noreferrer"&gt;email infrastructure&lt;/a&gt; with high deliverability rates and unique monitoring capabilities to ensure effortless maintenance and troubleshooting of deliverability issues.&lt;/p&gt;

&lt;p&gt;So, if you decide to go for Mailtrap Email Sending, you can relax knowing that you’ll reach recipient inboxes just in time and have access to actionable, in-depth analytics and up to 60 days of email logs.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/vAfUyKpWj_M"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Mailtrap Email Sending comes in the form of an SMTP service, which is great if you want quick and easy integration, as well as an email API providing even better flexibility.&lt;/p&gt;

&lt;p&gt;Sign up for a free Mailtrap account today, and you’ll have access to both its testing and sending solution. And you don’t have to worry about the setup process, as this will be smooth and secure from start to finish!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/register/signup" rel="noopener noreferrer"&gt;Try Mailtrap Today&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We hope you enjoyed this article on the most common reasons why emails go to spam. For more related content, check out our other articles below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://mailtrap.io/blog/avoid-spam-filters/" rel="noopener noreferrer"&gt;How to Avoid Emails Going to Spam: 3 Not-Easy Steps&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/email-domain-reputation/" rel="noopener noreferrer"&gt;What Is Email Domain Reputation?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/email-ip-reputation/" rel="noopener noreferrer"&gt;Email IP Reputation Explained&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://mailtrap.io/blog/shared-vs-dedicated-ip/" rel="noopener noreferrer"&gt;Shared vs Dedicated IP in Email Sending&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for reading this article! Follow Mailtrap blog and discover more &lt;a href="https://mailtrap.io/blog/why-are-my-emails-going-to-spam/" rel="noopener noreferrer"&gt;reasons that may cause emails go to spam&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>marketing</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>7 Email Preview Tools to Try Out Today</title>
      <dc:creator>Ketevan  </dc:creator>
      <pubDate>Fri, 08 Dec 2023 12:42:44 +0000</pubDate>
      <link>https://forem.com/ketbostoganashvili/7-email-preview-tools-to-try-out-today-3o84</link>
      <guid>https://forem.com/ketbostoganashvili/7-email-preview-tools-to-try-out-today-3o84</guid>
      <description>&lt;p&gt;Email preview and rendering tools are an essential part of the workflow whether you’re a developer setting up email sending or a marketer crafting campaigns. &lt;/p&gt;

&lt;p&gt;For about a month, I tested the most popular options on the market to find the best email preview tools. I split them into two segments: tools tailored to developers’ needs and tools created with marketers in mind. &lt;/p&gt;

&lt;p&gt;Below I’ll share my findings and personal experience and add to that with valuable information gathered from other users. &lt;/p&gt;

&lt;h2&gt;
  
  
  Selection criteria for email rendering and preview tools
&lt;/h2&gt;

&lt;p&gt;Based on the role, requirements for email rendering and preview tools will vary significantly. So, I decided to compile different criteria for developers and marketers. &lt;/p&gt;

&lt;h3&gt;
  
  
  Choosing email rendering tools for software engineers
&lt;/h3&gt;

&lt;p&gt;To find the most functional email rendering tools for software developers, I used the following criteria:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A wide selection of email clients. This is an absolute must, as recipients view emails from various webmail and desktop clients. &lt;/li&gt;
&lt;li&gt;Ease of integration. The ability to integrate the tool into an email-sending script or project for accurate and comprehensive testing. &lt;/li&gt;
&lt;li&gt;Automated testing. With this feature, the checks will be performed on every email before they are sent. &lt;/li&gt;
&lt;li&gt;The ability to test attachments, broken links, and loading speed. &lt;/li&gt;
&lt;li&gt;HTML code checking. This ensures the code will be rendered accurately across email clients. &lt;/li&gt;
&lt;li&gt;Mail merge testing. The ability to verify merge fields and ensure personalized variables are correct. &lt;/li&gt;
&lt;li&gt;Sandbox environment. A virtual environment that will capture your test emails and prevent them from reaching your recipients. &lt;/li&gt;
&lt;li&gt;Spam checker. This will locate parts of your email (be it body, headers, or SMTP transaction info) that can be seen as spammy and harm your &lt;a href="https://mailtrap.io/blog/email-deliverability/"&gt;email deliverability&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choosing email preview software for marketers
&lt;/h3&gt;

&lt;p&gt;Unlike developers, marketers are mainly concerned with email design. So, I mainly focused on that in my selection criteria:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A wide selection of email clients. This one is common among the two groups. &lt;/li&gt;
&lt;li&gt;The ability to preview emails across different devices. Modern emails should be mobile, desktop, and tablet-optimized. &lt;/li&gt;
&lt;li&gt;Ease of integration. However, this time we’re looking for integration options that don’t require coding (plugins for Email Service Providers or CRM platforms, ready-made apps or platforms, etc.). &lt;/li&gt;
&lt;li&gt;Spam and blacklist checker. Ideally, this feature should check the email for common spam triggers, test it against popular &lt;a href="https://mailtrap.io/blog/spam-filters/"&gt;spam filters&lt;/a&gt;, and provide information about blacklisted IP addresses.
&lt;/li&gt;
&lt;li&gt;The ability to check the buttons and links. &lt;/li&gt;
&lt;li&gt;Value for money. We believe this criterion is more indicative of the products’ worth than affordability. It shows how many features are included in the set pricing and how many of them are limited to the higher-paying plans. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best email preview and email rendering tools
&lt;/h2&gt;

&lt;p&gt;Before we dive into the reviews, let’s take a look at TL;DR comparison charts for the chosen email preview and email rendering tools. &lt;/p&gt;

&lt;h3&gt;
  
  
  Email rendering tools for software engineers: comparison chart
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u8VQp9yC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0g6h2qbnyf7q10il8jit.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u8VQp9yC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0g6h2qbnyf7q10il8jit.jpg" alt="Image description" width="554" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Email preview tools for marketers: comparison chart
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MUEU0IGy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpqd3ud07jyx1v6jigyu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MUEU0IGy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpqd3ud07jyx1v6jigyu.jpg" alt="Image description" width="352" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_Note: All prices are monthly rates. Most tools have discounts on annual subscriptions. Pricing is up-to-date at the time of publishing. _&lt;/p&gt;

&lt;h2&gt;
  
  
  3 Email rendering tools for software engineers and QAs
&lt;/h2&gt;

&lt;p&gt;Now it’s finally time to share my findings. &lt;/p&gt;

&lt;p&gt;To run the tests, I needed an HTML template. So, I went straight to &lt;a href="https://mailtrap.io/email-sending/"&gt;Mailtrap Email Sending&lt;/a&gt;’s &lt;a href="https://help.mailtrap.io/article/105-email-templates"&gt;transactional email templates&lt;/a&gt; feature. I found a great Welcome Email template created by one of my colleagues and got down to business. &lt;/p&gt;

&lt;h3&gt;
  
  
  Mailtrap
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://mailtrap.io/"&gt;Mailtrap&lt;/a&gt; is an email delivery platform that has both &lt;a href="https://mailtrap.io/email-sending/"&gt;Email Sending&lt;/a&gt; and &lt;a href="https://mailtrap.io/email-sandbox/"&gt;Email Testing&lt;/a&gt; solutions. For the purposes of this article, I’ll be focusing on Email Testing. &lt;/p&gt;

&lt;p&gt;Email Testing is an Email Sandbox that captures all the SMTP traffic and provides a safe environment to analyze and debug your emails. &lt;/p&gt;

&lt;p&gt;Creating an account and getting started is super straightforward. You just sign up, verify your email, and then you’ve got access to the platform. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p15cqOgI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lr4xn6pmb532tuhq7zl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p15cqOgI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lr4xn6pmb532tuhq7zl.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then went to the &lt;em&gt;Email Testing&lt;/em&gt; tab, accessed &lt;em&gt;My Inbox&lt;/em&gt;, tweaked the cURL with the HTML template, and sent the email. &lt;/p&gt;

&lt;p&gt;Within seconds, I had the email in the virtual inbox. I didn’t have to use &lt;a href="https://mailtrap.io/blog/email-for-testing/"&gt;dummy email addresses&lt;/a&gt; or borrow real ones from my friends. Since the tool leverages the &lt;a href="https://mailtrap.io/fake-smtp-server/"&gt;fake SMTP server&lt;/a&gt;, sample emails were enough. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AghiAt00--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7i4vudsj4qne3fi5lrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AghiAt00--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7i4vudsj4qne3fi5lrl.png" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, I checked mobile, desktop, and tablet previews to test how the email looks on these devices. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KV2H6k_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thvokytx9tr9rrz13y1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KV2H6k_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thvokytx9tr9rrz13y1x.png" alt="Image description" width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, I navigated to the &lt;em&gt;HTML Source&lt;/em&gt; tab. I found that the HTML contained elements that some email clients wouldn’t support. To examine the client support level further, I opened the &lt;em&gt;HTML Check&lt;/em&gt; tab. &lt;/p&gt;

&lt;p&gt;In its original form, the recipients who used Apple Mail on Desktop, Mobile, or the Web would have no trouble accessing my emails (the support was 100%). But the client support level was 77% for Gmail, 84% for Outlook, 71% for Yahoo! Mail, and 85% for other email clients. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iH4x8AD9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqzokp18blleopsxjiw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iH4x8AD9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yqzokp18blleopsxjiw6.png" alt="Image description" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One last step of the HTML check was to compare the text and HTML versions of the email. In this case, they matched. &lt;/p&gt;

&lt;p&gt;I was quite impressed with the results I got from the &lt;a href="https://mailtrap.io/html-email-checker/"&gt;HTML checker&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;I didn’t forget to click the buttons to ensure the links weren’t broken. &lt;/p&gt;

&lt;p&gt;Finally, I headed over to the Spam Analysis tab. The score was 1.6, which meant I had nothing to worry about. I scrolled down to the Blacklist Report to verify that my IP wasn’t blacklisted. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b_YbPfcq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehxiwt86e6sbohunejgh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b_YbPfcq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehxiwt86e6sbohunejgh.png" alt="Image description" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What I found particularly interesting was that apart from the email template, you can also test email app load, email forwarding, BCC, and message headers. It’s possible to use Email Testing API with popular automation testing tools and software, including Selenium, Cucumber, Protractor, etc. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML Check tab to check the emails for elements that won’t be supported (or be partially supported) by email clients &lt;/li&gt;
&lt;li&gt;Spam Analysis to view the spam score and check the Blacklist report&lt;/li&gt;
&lt;li&gt;SMTP and API integration options with code samples and official SDKs&lt;/li&gt;
&lt;li&gt;A custom inbox email address with the ability to create aliases to simulate sending emails to recipients and test email app load (available starting from the Business plan) &lt;/li&gt;
&lt;li&gt;Sandbox environment to avoid spamming recipients.&lt;/li&gt;
&lt;li&gt;The ability to check the links and attachments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can easily be integrated with the most popular programming languages and frameworks&lt;/li&gt;
&lt;li&gt;The tool is well-documented, making it easier to get started &lt;/li&gt;
&lt;li&gt;Tests can be performed in bulk &lt;/li&gt;
&lt;li&gt;Makes it possible to not only analyze the template but also test email functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email previews are limited to mobile, desktop, and tablet. No client preview is available. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mailtrap Email Testing has a generous free tier with the ability to test up to 100 emails per month. The free tier includes 1 inbox, an inbox capacity of 50 emails, and a threshold of 5 emails per 10s. &lt;/p&gt;

&lt;p&gt;Paid plans start from $14.99 (Individual plan) a month and provide access to advanced features and higher limits. You’ll find detailed pricing information &lt;a href="https://mailtrap.io/pricing/"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Access to customer support is equal for every user regardless of the plan they are using, while priority support is available starting from the Individual tier. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What other users think (based on G2 and Capterra) *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Mailtrap has 4.8 stars on &lt;a href="https://www.g2.com/products/mailtrap/reviews"&gt;G2&lt;/a&gt; and 5 stars on &lt;a href="https://www.capterra.com/p/210463/Mailtrap/"&gt;Capterra&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Most users found Email Testing easy to set up and use. They were satisfied with the available features and praised how supportive the customer service was. &lt;/p&gt;

&lt;p&gt;Some users were displeased that inbox email addresses are limited to higher-paying plans, while others wished to see more storage capacity on free and lower-tier plans. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://mailtrap.io/register/signup"&gt;Try Mailtrap for Free&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mailosaur
&lt;/h2&gt;

&lt;p&gt;The second tool I tested was &lt;a href="https://mailosaur.com/"&gt;Mailosaur&lt;/a&gt;. It’s an end-to-end email testing solution very similar to Mailtrap Email Testing. &lt;/p&gt;

&lt;p&gt;I created an account and started exploring the interface. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oVfvsCkM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6c18qzv2zati9oho5i7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oVfvsCkM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6c18qzv2zati9oho5i7f.png" alt="Image description" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I clicked &lt;em&gt;Begin Email Testing&lt;/em&gt; and I was taken to a step-by-step integration wizard. You have three options: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send an email to the generated email address (or its alias);&lt;/li&gt;
&lt;li&gt;Integrate Mailosaur with SMTP;&lt;/li&gt;
&lt;li&gt;Let the platform create a sample plain text email. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the initial test, I went with the first option as it seemed to be the fastest. I copied the email address and sent an HTML email to it. I clicked the Inbox in the left navigation panel and the email had already arrived. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AZZpC97l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjv7xztncprw7gl73hid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AZZpC97l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pjv7xztncprw7gl73hid.png" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, I was curious to see what elements of the email I could check. In the screenshot above, you can see a navigation panel on the right-hand side. Available options are &lt;em&gt;Links, Codes&lt;/em&gt; (i.e. verification codes extracted from the email), &lt;em&gt;Attachments, HTML Source, API Response, Screenshots&lt;/em&gt; (i.e. email client previews), &lt;strong&gt;Deliverability Report_, and _Original&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I played around with &lt;em&gt;Links, Codes,&lt;/em&gt; and &lt;em&gt;Attachments&lt;/em&gt;, and all of them yielded the expected results. &lt;/p&gt;

&lt;p&gt;Then I opened the _HTML Source _tab which wasn’t what I expected it to be. The source code didn’t have any formatting, spacing, or indentations, making it hard to read and analyze. And unlike Mailtrap, it didn’t contain any information on supported/unsupported elements. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nIPT96gJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6085grahgmmyzyzq9ww1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nIPT96gJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6085grahgmmyzyzq9ww1.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A nice surprise was the &lt;em&gt;API Response&lt;/em&gt; tab which can potentially be quite useful to test how your API requests are performing. &lt;/p&gt;

&lt;p&gt;The biggest jam of all was the &lt;em&gt;Screenshots&lt;/em&gt; tab which enables you to generate screenshots for desired email clients. During the free trial, 85 email client previews were available (including dark mode and even iPhone 15 models). I played around with most of them and I must say, I was impressed. You can see some of the results in the image below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3R7iXggi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ftoswi4ibfp5j02savam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3R7iXggi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ftoswi4ibfp5j02savam.png" alt="Image description" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Email previews from Mailosaur: (from left to right) Gmail App on iOS 14.2, Gmail App with Dark Mode on iOS 14.3, and iPhone 15&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;The next stop was the deliverability report. The platform scans your email to check if SPF, DKIM, and DMARC are configured properly for your domain. It also provides SpamAssassin results and checks the email for content indicators (‘spam triggers’). Mailosaur lists DNS records as well to help you detect issues and correct them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jg_KvgD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2i2p41twneckurp950b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jg_KvgD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2i2p41twneckurp950b.png" alt="Image description" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, Original (EML) provides information about the email transaction and includes all the headers. &lt;/p&gt;

&lt;p&gt;Another feature that I found quite useful was the ability to design and preview emails right within the platform. You simply copy and paste (or write from scratch) the HTML code and you immediately see what it looks like. As you edit the code, you can see the changes in design in live mode. &lt;/p&gt;

&lt;p&gt;This feature includes email client screenshots as well. &lt;/p&gt;

&lt;p&gt;I used more complex templates to test out this feature and I can safely say that Mailosaur really excels at previews. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Features *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SMTP and API integration with SDKs for Playwright, Cypress, Node.js, Python, Java, .NET, Ruby, PHP, and Go&lt;/li&gt;
&lt;li&gt;SMS Testing for companies that use SMS in addition to emails in their marketing communications&lt;/li&gt;
&lt;li&gt;Sandbox environment&lt;/li&gt;
&lt;li&gt;The ability to test multi-factor authentication&lt;/li&gt;
&lt;li&gt;Email previews for 85 email clients&lt;/li&gt;
&lt;li&gt;HTML code editor with real-time preview&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy integration and setup thanks to the step-by-step wizard and various integration options. &lt;/li&gt;
&lt;li&gt;A wide selection of email clients. &lt;/li&gt;
&lt;li&gt;The ability to create automated tests &lt;/li&gt;
&lt;li&gt;In addition to basics, documentation covers common testing scenarios &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The HTML Source tab doesn’t provide useful information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Pricing *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Mailosaur doesn’t have a free tier, but they do offer a 14-day free trial for all pricing tiers. The cheapest plan starts at $9 per month for 50 emails/day which can be upgraded up to 1,000 for an additional fee. &lt;/p&gt;

&lt;p&gt;Mailosaur seems to have only annual billing at this point, which can be inconvenient for individuals or small teams. &lt;/p&gt;

&lt;p&gt;Advanced features such as automatic forwarding, connecting via POP3, or SMS testing are available starting from the Business plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What other users think (based on G2 and Capterra)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mailosaur has a 4.9-star rating on G2 and a 4.8-star rating on Capterra. &lt;/p&gt;

&lt;p&gt;Most users reported that the platform was easy to integrate with modern QA automation tools, the UI was intuitive, and it was easy to search the messages. &lt;/p&gt;

&lt;p&gt;The common complaint they had was the occasional inability of Mailosaur API to read emails and the per-user surcharge on pricing plans. &lt;/p&gt;

&lt;h3&gt;
  
  
  HTML Email Check
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.htmlemailcheck.com/"&gt;HTML Email Check&lt;/a&gt; is a bit different from the previous tools. Instead of being a ‘traditional’ HTML email preview tool, it’s more like a markup validation software. While it does have the visual testing feature, it’s built to analyze the HTML, XHTML, and CSS in your code. &lt;/p&gt;

&lt;p&gt;And when I say it’s an HTML code checker, I mean it. This feature is free, and you don’t even have to create an account. &lt;/p&gt;

&lt;p&gt;All you have to do is paste your HTML code into the dedicated field, click Check Code, and you’ll immediately see a list of issues in your script. This list also includes the number of lines that were affected, as well as possible fixes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mscdaIVU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th1bstuw65qd04gslzhl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mscdaIVU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th1bstuw65qd04gslzhl.png" alt="Image description" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As I scrolled down and examined the recommendations closely, I noticed that the check results included information about the affected email clients. So, some parts of my HTML code (&lt;strong&gt; and  tags) wouldn’t be supported by Gmail, Microsoft Outlook, and Yahoo! Mail. 

&lt;p&gt;My email had way more issues when it came to CSS. And I had a whole list of email clients along with short explanations. I found these short explanations useful, particularly for junior developers learning HTML and CSS. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AXOZwP8z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpwn8tobfr6y3gtrzlhq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AXOZwP8z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vpwn8tobfr6y3gtrzlhq.png" alt="Image description" width="800" height="809"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rest of the tests and features are paid. Once you upgrade to one of the plans, you get access to font, image, and link validation, as well as spam checker, visual tester, dark mode, accessibility validation, etc. &lt;/p&gt;

&lt;p&gt;Accessibility validation is an important feature and I was very happy to see it on this platform. It checks your code for alt text and tags, provides recommendations on font size and readability, and validates dark mode. And all those tests are client-specific. &lt;/p&gt;

&lt;p&gt;What’s not client-specific is the visual tester. I was able to test the email template on desktop, tablet, and mobile devices in portrait and landscape modes. But I couldn’t preview them in email clients the way I did with Mailosaur. &lt;/p&gt;

&lt;p&gt;Overall, I really enjoyed using HTML Email Check as it has a minimal learning curve. In terms of creating an error-free HTML code, this tool is very hard to beat. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accessibility and dark mode validation &lt;/li&gt;
&lt;li&gt;Comprehensive HTML and CSS checker &lt;/li&gt;
&lt;li&gt;Spam checker &lt;/li&gt;
&lt;li&gt;The ability to send test emails to real inboxes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runs validation checks against the most popular email clients&lt;/li&gt;
&lt;li&gt;Has an HTML email previewer &lt;/li&gt;
&lt;li&gt;Can be used in conjunction with your email service provider (ESP) &lt;/li&gt;
&lt;li&gt;Very easy to get started and use &lt;/li&gt;
&lt;li&gt;Provides recommendations to debug your HTML code &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The free email checker is limited in functionality &lt;/li&gt;
&lt;li&gt;Message preview is device-based &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML Email Check has three pricing tiers. The Standard plan costs $23.95 a month and provides access to core validation features. The Business plan will cost you $35.95 a month, but you’ll be able to use a spam checker, visual tester, email sending for test emails, and validation expert. &lt;/p&gt;

&lt;p&gt;There’s also an Enterprise plan for $59.95 a month with access to accessibility, dark mode, and mobile validation, a developer checklist, 24/7 priority support, and a visual tester inspector.&lt;/p&gt;

&lt;p&gt;HTML Email Check doesn’t have a free trial for the paid plans, but it does offer limited free email testing features.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What other users think (based on G2 and Capterra) *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;At the time of writing, HTML Email Check doesn’t have any reviews on G2 or Capterra. &lt;/p&gt;

&lt;h2&gt;
  
  
  4 Email preview tools for marketers
&lt;/h2&gt;

&lt;p&gt;Below I’ll be diving into 4 email preview tools for marketers that proved to be most reliable and effective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Litmus
&lt;/h3&gt;

&lt;p&gt;Litmus has two tools for previewing emails: &lt;a href="https://putsmail.com/"&gt;PutsMail&lt;/a&gt; (the free option) and &lt;a href="https://www.litmus.com/"&gt;Litmus&lt;/a&gt; itself (the paid version). &lt;/p&gt;

&lt;p&gt;The free email preview tool is quite limited. You can use it to inline CSS or send test emails to sample email addresses you own, but I didn’t find it usable, especially compared to Litmus itself. &lt;/p&gt;

&lt;p&gt;So, in this review, I’ll be concentrating on Litmus. &lt;/p&gt;

&lt;p&gt;Getting started with this tool is quite easy – you just create an account, activate your free trial or subscription by entering your card details, and you’re ready to use the features right away. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a3Uvwqe3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5xji7oz0oshv6eg89k8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a3Uvwqe3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5xji7oz0oshv6eg89k8.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To start testing, you can use one of their templates or build your own email from scratch. I chose the second option as I wanted to test a particular HTML email. This takes you to a builder, which previews the email as you enter the script. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KpfkrDlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x07ipdtbi011m2p92skh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KpfkrDlo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x07ipdtbi011m2p92skh.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The preview options are quite extensive and include dark mode, mobile and desktop views, image toggle, and different visual impairment options. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l2YcMuhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owgq5adj9rxblzy77vd2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l2YcMuhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owgq5adj9rxblzy77vd2.png" alt="Image description" width="554" height="986"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As expected, the &lt;em&gt;Preview&lt;/em&gt; tab shows email previews for various email clients. But the information in the &lt;em&gt;QA Checks&lt;/em&gt; tab is way more interesting. &lt;/p&gt;

&lt;p&gt;Litmus shows your template’s preview text example and provides recommendations. For example, my template lacked preview text, so Litmus recommended adding it as the first element in the body and keeping the preview text length above 90 characters. &lt;/p&gt;

&lt;p&gt;_Note: Email preview text (or preheader text) is the short ‘description’ shown under the subject line in most email clients. _&lt;/p&gt;

&lt;p&gt;QA checks also included accessibility and loading speed tests. These were initial tests that allow you to improve your template as you’re building it. &lt;/p&gt;

&lt;p&gt;As you move to the &lt;em&gt;Previews &amp;amp; QA&lt;/em&gt; tab, you can see those test results (and some additional tests) in more detail. &lt;/p&gt;

&lt;p&gt;Apart from the mentioned components, Litmus will check the subject line, links, and tracking, and run the spam tests. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aHEYg52s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y58fe667ojbtr30m01jh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aHEYg52s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y58fe667ojbtr30m01jh.png" alt="Image description" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Email Guardian is a great addition to these features. It monitors major email clients and notifies you of any important changes. This way, you can continuously improve selected templates to avoid issues with deliverability, accessibility, or rendering. &lt;/p&gt;

&lt;p&gt;What I liked the most was the ability to sync Litmus with your ESP to test email marketing campaigns automatically. Integration options include HubSpot, Mailchimp, Campaign Monitor, Salesforce Marketing Cloud, and others. &lt;/p&gt;

&lt;p&gt;On the downside, the platform can get a bit slow at times, especially while loading previews. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integration with popular ESPs to test templates automatically &lt;/li&gt;
&lt;li&gt;Email Guardian that monitors email clients&lt;/li&gt;
&lt;li&gt;Real-time preview for more than 90 email clients &lt;/li&gt;
&lt;li&gt;Code and drag-and-drop template builder &lt;/li&gt;
&lt;li&gt;Extensive accessibility tests for various visual disabilities &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy-to-use, intuitive UI &lt;/li&gt;
&lt;li&gt;No coding is required (unless you’re building an HTML template script from scratch)&lt;/li&gt;
&lt;li&gt;Integration with collaboration tools &lt;/li&gt;
&lt;li&gt;An email testing checklist for building perfect emails &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ESP and code editor integrations are available only for higher-paying plans &lt;/li&gt;
&lt;li&gt;Previews may take a while to load &lt;/li&gt;
&lt;li&gt;A bit pricey compared to its competitors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Pricing *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Litmus has three pricing tiers: Litmus Basic, Litmus Plus, and Litmus Enterprise. &lt;/p&gt;

&lt;p&gt;Litmus Basic starts at $99 a month and includes all the basic features you’d need. Litmus Plus will cost you $199 a month but it will give you access to spam tests, ESP integrations, code editor integrations, etc. &lt;/p&gt;

&lt;p&gt;For Litmus Enterprise, you’ll need to request a custom quote. &lt;/p&gt;

&lt;p&gt;Basic and Plus plans have a 7-day free trial for a detailed test run. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What other users think (based on G2 and Capterra)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Litmus has 4.7 stars on &lt;a href="https://www.capterra.com/p/178360/Litmus/reviews/"&gt;Capterra&lt;/a&gt; and 4.6 stars on &lt;a href="https://www.g2.com/products/litmus/reviews"&gt;G2&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Most users enjoyed the variety of features and the ease of using the platform. Some downsides they emphasized were the loading time of previews, expensive pricing, and hard-to-set-up analytics. &lt;/p&gt;

&lt;h3&gt;
  
  
  Email on Acid
&lt;/h3&gt;

&lt;p&gt;Similar to Litmus, &lt;a href="https://www.emailonacid.com/"&gt;Email on Acid&lt;/a&gt; is an email builder and preview testing tool in one. It provides two types of testing: Email Testing which tests your template and Campaign Precheck which runs tests based on a predefined checklist. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mVkypo8L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oommfyiels54cmymy4no.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mVkypo8L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oommfyiels54cmymy4no.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Email Testing provides previews for more than 90 email clients, runs deliverability tests by checking feedback filters and authentication protocols, and validates URLs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TLEaJW0M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/775mvzcmwv2yhrgi0z34.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TLEaJW0M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/775mvzcmwv2yhrgi0z34.png" alt="Image description" width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, the results of Email Testing were nothing out of the ordinary and were similar to the info we received from other tools. &lt;/p&gt;

&lt;p&gt;Where Email on Acid stands out is the Campaign Precheck. Initially, I didn’t think it would be much different from Email Testing. But Campaign Precheck is way more comprehensive and allows you to refine every aspect of your email before it gets to recipients. &lt;/p&gt;

&lt;p&gt;To use this feature, you can either leverage Email on Acid’s default workflow or create your own. Since I wanted to see what the tool was capable of, I chose the recommended workflow. &lt;/p&gt;

&lt;p&gt;Here’s what it does: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allows you to set the sender name, email subject line, and preheader text while previewing them on mobile, desktop, and webmail; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xsZqyQnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkqpfadbn7gbh565zwcl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xsZqyQnC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkqpfadbn7gbh565zwcl.png" alt="Image description" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helps you optimize the accessibility of the email through a step-by-step process and provides explanations for each step. I was able to hear the difference between screen reader behaviors with and without pre-defined language. Any issues can easily be fixed by clicking a button;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P8-GbSIh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpzhlqe5ogoj6x0zcn4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P8-GbSIh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpzhlqe5ogoj6x0zcn4u.png" alt="Image description" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks the links and provides an option to add UTM parameters to get more accurate results when you analyze the campaign in Google Analytics;&lt;/li&gt;
&lt;li&gt;Optimizes images and other media;&lt;/li&gt;
&lt;li&gt;Checks the email content for spelling errors; &lt;/li&gt;
&lt;li&gt;Checks the email for blocklisted domains; &lt;/li&gt;
&lt;li&gt;Runs the spam test on the subject line. While I like this feature, it can take a while to complete;&lt;/li&gt;
&lt;li&gt;Shows you previews for selected email clients;&lt;/li&gt;
&lt;li&gt;Provides a Precheck summary and allows you to see the changes made to the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Email on Acid has an email editor with templates. However, the designs seemed a bit outdated. &lt;/p&gt;

&lt;p&gt;It’s also possible to set up email analytics but I haven’t given it a fair try as my focus was to test the email testing portion of the tool. The analytics feature allows you to track open rates, the effectiveness of call-to-action (CTA) buttons, click-through (CTR) rates, and other important metrics.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Features *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple testing options to refine email templates before sending them to an email list &lt;/li&gt;
&lt;li&gt;A wide selection of email clients&lt;/li&gt;
&lt;li&gt;A step-by-step wizard that adjusts the code automatically without the users having to code themselves&lt;/li&gt;
&lt;li&gt;The ability to send test emails from ESP, Email on Acid platform, or a selected SMTP server for deliverability checks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimal learning curve &lt;/li&gt;
&lt;li&gt;Easy to optimize the template and see the reason behind each modification &lt;/li&gt;
&lt;li&gt;Code editor with snippets and live preview&lt;/li&gt;
&lt;li&gt;Comprehensive tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lacks regular and dark mode previews for the Gmail app on iOS and Android &lt;/li&gt;
&lt;li&gt;Spam tests take a while to load &lt;/li&gt;
&lt;li&gt;Lacks information on why the email failed the spam filter test &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Email on Acid has four pricing tiers: The Basics, Premium, Professional, and Enterprise. &lt;/p&gt;

&lt;p&gt;The Basics costs $99/month and includes unlimited previews and projects, 1 user, partial content checking, and an email editor. Premium costs $179/month and provides access to full content checking, deliverability tests, 3 users, and email analytics for 500k opens/month. &lt;/p&gt;

&lt;p&gt;Professional costs $599/month for 10 users, custom user permissions, dedicated support representative, and email analytics for 1.5M opens/month. &lt;/p&gt;

&lt;p&gt;You should get a custom quote to use an Enterprise plan. &lt;/p&gt;

&lt;p&gt;There’s a 7-day free trial for all paid plans. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What other users think (based on G2 and Capterra)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Email on Acid has 4.5 stars on &lt;a href="https://www.g2.com/products/email-on-acid/reviews"&gt;G2&lt;/a&gt; and 4.4 starts on &lt;a href="https://www.capterra.com/p/174836/Email-on-Acid/reviews/"&gt;Capterra&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Most users enjoy the results they get from Campaign Precheck tests, the fact that they don’t have to code to optimize the template, and how easy it is to use the platform. &lt;/p&gt;

&lt;p&gt;Some disadvantages users highlighted were the lack of certain important clients and the occasional inaccuracy of email previews. &lt;/p&gt;

&lt;h3&gt;
  
  
  Email Preview Services (formerly PreviewMyEmail)
&lt;/h3&gt;

&lt;p&gt;The third tool I chose for this list is &lt;a href="https://emailpreviewservices.com/en"&gt;Email Preview Services&lt;/a&gt;, formerly known as PreviewMyEmail. It’s suitable for developers and marketers. &lt;/p&gt;

&lt;p&gt;For developers, it has a white-label API that can be used to preview email templates from any programming language. However, this feature is only available to enterprise users. That’s why I decided to include it here. &lt;/p&gt;

&lt;p&gt;There are two ways of accessing inbox preview: by sending an email to the inbox address or inserting a template manually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A5l0hQm2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4aibhbh38ljwmy7co13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A5l0hQm2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4aibhbh38ljwmy7co13.png" alt="Image description" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, I opened the &lt;em&gt;Preview tab&lt;/em&gt;, clicked &lt;em&gt;Create a new test&lt;/em&gt;, and added my template manually. There’s a list of email clients and you can easily toggle between them if needed. I clicked &lt;em&gt;Start Test&lt;/em&gt; and the previews started loading. I’d say the loading time was average. &lt;/p&gt;

&lt;p&gt;While I liked the quality of the screenshots, client previews certainly lacked Android options and modern iPhone devices. Web browser and desktop email clients were more diverse, though. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AkpAa7Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d09biv0twrl8wkw59329.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AkpAa7Hj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d09biv0twrl8wkw59329.png" alt="Image description" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I sent an email to an inbox email address and the results were exactly the same. &lt;/p&gt;

&lt;p&gt;There’s also an option to create, store, download (HTML), or test templates right on the platform. &lt;/p&gt;

&lt;p&gt;Finally, I ran the spam test. This test checks the sender score, authentication protocols, blacklists, links, images, and HTML code.  &lt;/p&gt;

&lt;p&gt;Overall, Email Preview Services provides high-quality previews at an affordable price. While it may lack the advanced features that Email on Acid and Litmus have, it still delivers great value for money. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Previews from around 50 email clients &lt;/li&gt;
&lt;li&gt;Spam and infrastructure checks&lt;/li&gt;
&lt;li&gt;Drag-and-drop email editor&lt;/li&gt;
&lt;li&gt;Analytics feature that provides data on which clients recipients use, unique total opens, geolocation, email address activity log, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High-quality preview screenshots &lt;/li&gt;
&lt;li&gt;Affordable pricing &lt;/li&gt;
&lt;li&gt;Straightforward platform and testing workflow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Cons *&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email client previews lack modern devices and operating systems &lt;/li&gt;
&lt;li&gt;Content and HTML checks could be more comprehensive &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Email Preview Services has four pricing plans: Standard, Business, Professional, and Enterprise. &lt;/p&gt;

&lt;p&gt;If you choose the Standard plan, you’ll pay $25 a month for unlimited previews, 5 email spam and inbox tests, a simple editor, and 1 user. The Business plan is available for $45 a month and provides access to analytics, an advanced editor, 25 spam and inbox tests, and 1 user. &lt;/p&gt;

&lt;p&gt;For more seats, analytics, and spam tests, you’ll have to opt either for a Professional ($160/month) or Enterprise ($399/month) plan. &lt;/p&gt;

&lt;p&gt;A 7-day free trial is available for all paid plans. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What other users think (based on G2 and Capterra) *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;At the time of writing, Email Preview Services doesn’t have reviews on G2 and Capterra. &lt;/p&gt;

&lt;h3&gt;
  
  
  SendForensics
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.sendforensics.com/"&gt;SendForensics&lt;/a&gt; is an email deliverability testing tool that allows you to preview and test email campaigns. &lt;/p&gt;

&lt;p&gt;After signing up, you’re prompted to send an email to a specific email address. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zQT3iY48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0c5eyiaggqg09l3tec1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zQT3iY48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0c5eyiaggqg09l3tec1.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within seconds, you’ll see it on the SendForensics platform. At that point, the email has already been analyzed and you can access the results right away. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SieK5yt4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8weqdodtxruxttp8iuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SieK5yt4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8weqdodtxruxttp8iuv.png" alt="Image description" width="800" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you press your sending domain, you’re taken to a Snapshot that contains the overall results of the analysis. You can see deliverability score, infrastructure analysis, and content analysis. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xMMm1a-e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uiqh78ge2kznkd4cib4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xMMm1a-e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uiqh78ge2kznkd4cib4h.png" alt="Image description" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;Content&lt;/em&gt; tab highlights problematic elements of your email content. It scans your email for spam triggers that can land you in a spam folder. In this tab, you’ll find potential issues with HTML code, link validation results, and improper data collection practices, if any. &lt;/p&gt;

&lt;p&gt;I adjusted the template according to the platform’s recommendations and ran another test. That’s when I noticed that their content-checking feature wasn’t as robust as I expected. The recommendations can be ambiguous and unusable at times. &lt;/p&gt;

&lt;p&gt;The good thing is, there’s an explanation for each recommendation. So, you can use your own expertise to filter out the results. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zndeyGAE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k5ppl6ekfwzodwhgxoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zndeyGAE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6k5ppl6ekfwzodwhgxoh.png" alt="Image description" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In terms of infrastructure, SendForensics checked if my IP was blacklisted and scanned my SPF, DKIM, and DMARC records. This is quite useful, especially if you’re trying to improve the template to ensure good deliverability rates. For more accurate and comprehensive checks, it’s possible to add an ESP plugin to SendForensics. &lt;/p&gt;

&lt;p&gt;There’s also an option to check cookie forensics and legal compliance. This includes checking whether the email has an unsubscribe link in it. &lt;/p&gt;

&lt;p&gt;The last tab is &lt;em&gt;Previews&lt;/em&gt; which shows you how your email will look in different email clients. The results are actual screenshots, not simulations. This will help you avoid improper rendering as you send the campaigns to recipients. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nLIQYUT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yl4ez2h39c6lzug9dnrb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nLIQYUT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yl4ez2h39c6lzug9dnrb.png" alt="Image description" width="800" height="201"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Email Previews for Apple Mail (Desktop), AOL (Webmail), and Gmail (Webmail)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deliverability analysis&lt;/li&gt;
&lt;li&gt;Content checks&lt;/li&gt;
&lt;li&gt;Email preview screenshots&lt;/li&gt;
&lt;li&gt;ESP plugins &lt;/li&gt;
&lt;li&gt;Customizable domain settings for accurate tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recommendations that are easy to understand and implement&lt;/li&gt;
&lt;li&gt;Comprehensive deliverability checks&lt;/li&gt;
&lt;li&gt;Ready-to-use platform &lt;/li&gt;
&lt;li&gt;Integration with a third-party ESP&lt;/li&gt;
&lt;li&gt;Affordable compared to other preview tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have to send emails to SendForensics over and over again to access analysis after modifying the template&lt;/li&gt;
&lt;li&gt;Content improvement recommendations aren’t always accurate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;SendForensics has four pricing plans: Brand at $49/month, Company at $79/month, Agency at $199, and Enterprise at $349. &lt;/p&gt;

&lt;p&gt;The pricing plans aren’t feature-based, which means that most of the features are similar across the tiers. What differs is the number of domains, users, and DMARC reports per month. &lt;/p&gt;

&lt;p&gt;The cheapest plan (Brand) has a 14-day free trial. A free plan isn’t available. &lt;/p&gt;

&lt;p&gt;*&lt;em&gt;What other users think (based on G2 and Capterra) *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;SendForensics has 3.8 stars on &lt;a href="https://www.g2.com/products/sendforensics/reviews"&gt;G2&lt;/a&gt; and 4.3 stars on &lt;a href="https://www.capterra.com/p/163121/SendForensics/#reviews"&gt;Capterra&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This tool isn’t as popular as the others, so the rating is based on 6 reviews in total. &lt;/p&gt;

&lt;p&gt;Most users liked the deliverability checks, value for money, and the ability to run unlimited tests. &lt;/p&gt;

&lt;p&gt;Just like me, others also noticed that the content checks need a bit of improvement to be more accurate. &lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;So, to conclude, here are some key takeaways from my research: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Finding decent email rendering and email preview tools isn’t easy, especially for developers&lt;/li&gt;
&lt;li&gt;Pricing tends to be on the higher side for email preview tools created for marketers&lt;/li&gt;
&lt;li&gt;There’s no such thing as a free email preview tool, but there certainly are free tiers with limited features and previews &lt;/li&gt;
&lt;li&gt;Most email marketing platforms will allow you to preview emails before sending them and some will even have email client previews. Such platforms include Mailchimp, GetResponse, Constant Contact, and others.&lt;/li&gt;
&lt;li&gt;Email marketing platforms won’t provide comprehensive previews and tests. For that, you will need to invest in a dedicated tool.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you’re interested in email client testing and email testing in general, check out the recommended reads: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.mailtrap.io/email-testing-checklist/"&gt;Email Testing Checklist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.mailtrap.io/test-email-deliverability/"&gt;The Best Email Deliverability Testing Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mailtrap.io/blog/email-client-testing/"&gt;Email Client Testing Explained&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep an eye on our blog as we’ll be covering even more testing topics in the upcoming months.&lt;/p&gt;

&lt;p&gt;Good luck and preview away!&lt;/p&gt;

&lt;p&gt;Thank you for choosing this article! Find out more useful information about &lt;a href="https://mailtrap.io/blog/email-preview/"&gt;html email preview tools&lt;/a&gt; in Mailtrap blog!&lt;/p&gt;

&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
