This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Calculate Your Savings on Cloudways and Compare With Kinsta, WP Engine and Flywheel. Calculate Now

How To Avoid Sending Spam Emails In Magento

Updated on December 24, 2021

4 Min Read

Online Magento stores are very much concerned about their emails being received by users in the Spam folders. The situation becomes deteriorating when transactional emails land inside Spam. This may cause the customers to think about the security concerns while opening such emails.

Magento Email Spam

Why emails reach the spam folder even if they contain serious messages? The issue is being discussed at many Magento related forums. In this blog post, I will elaborate about how spam filters work and what are the four effective steps to tackle this issue.

  1. Configuring Server And IP
  2. Recommended Email Structure for Magento Emails
  3. Content Considerations For Magento Emails
  4. Test The Email Messages Before Sending

How Spam Filters Work

If spam filters are enabled on a Magento web store, the incoming emails are filtered by specific predefined parameters. Each filtering parameter influences the rating positively or negatively, and the final score determines whether the email is spammy or not. SpamAssassin, the most famous email filtering computer program, recommends 6.6 as an average rating on its system. This means lower scoring emails will pass through the spamming filter successfully, while the higher scoring ones will get filtered.

In the following lines, I will highlight the steps that can help you reduce the chance of email getting labeled as “Spam.”

Avoiding Spam Emails In Magento Based Online Stores

Ensure that your server is correctly configured and DNS has complete essential records. The email message should have all the headers and MEME parts filled out. Before sending, you should test the email.

Cloudways Magento Hosting For Non-Technicals

1. Configuring Server And IP

Configure domain SPF record: It’s a TXT record that is found in DNS. This record contains all IPs and hostnames that can send emails from the domain. On receiving the email, SPF record checks for authorized emails.

Domain keys identified mail: A signature is added to each message going out. The sender is verified by reading public key found in your domain’s DNS record. A private key, public key, and signature all are found in DNS record.

This approach just adds a security layer, but it won’t guarantee to avoid spam emails.

Reverse DNS: The email should have its own IP address and a resolved hostname.

MX record to determine the responsible mail servers: It’s necessary because in case, the email remains undelivered to the recipient, the server sends back the notification about undelivered email.

Get the IP address cleared: Wrong emails can block the IP address. This is why we think it is a right decision to set up your store on hosting infrastructure with dedicated IP.

SMTP: SMTP server provides an excellent solution for Magento-based emails. It can be private or public mail server. A single server can be good enough for many Magento projects. Proper functioning and backups are required.

Once the server is configured, move to the next step.

2. Recommended Email Structure for Magento Emails

Include text part: It is a fact that Magento sends only the HTML part, not the text part. You have to create the text part either manually or automatically.

The line length of quote-printable: Make the length a maximum of 998 characters and a minimum of 78 characters. It’s a specification of RFC 2822. The default line length of Magento print-quotable is 200 characters. If you want, you can change this value.

Embed images into email messages: To avoid spam emails, it is better to embed images into email messages, but avoid linking them from some remote source.

Use valid HTML: For email body structure, ask an expert HTML developer to create a fine piece of HTML for your email. Avoid CSS3. Just stick to simple HTML and tables.

3. Content Considerations For Magento Emails

Add value: Write only useful and essential content for the readers. Whatever you write, be confident and stand by your point. It will help the ultimate goals. Write for humans—and not for the machines.

Avoid emails using single images: Single images create confusion and label the emails as spam. Use HTML coding instead.

Avoid link shorteners: Using short links for emails will make them less trustable. The chances of spam emails increase if a shortened link is used.

Check out 5 Best Email Hosting for Small Business in 2020

4. Test The Email Messages Before Sending

Acquire third-party services: Before sending the email message, test it first. Check for spam score. Use third-party services to test the email in different apps. You will get your email message previews on different platforms as well as on desktop and smartphones for your web clients. You will also get the suggestions for your email’s HTML coding.

Send to your team: After you are done with creating the Magento follow-up email, send it to your teammates. Get real feedback and improve if necessary.

Check for the mobile view:  Your Magento email should have a perfect look on all smartphones devices. Test for that.

Considering the points mentioned above, the chances your emails will land directly in the Inbox, and not inside the Junk folder. Play with the spam filters wisely and avoid losing any important messages to the spam folder and getting unnoticed by the prospects. Plus, the Follow Up Email Extension can help you with this feat as well.

In the end, I think it is an excellent decision to host your store on dedicated cloud servers. Dedicated servers come with unique IP addresses. On shared infrastructure, the IP address is shared among many accounts. If one of the account on this shared IP is spamming, it will surely hurt the authenticity of the other accounts. Therefore, one should set up email using a dedicated server. On Cloudways, you can get a dedicated cloud server for as little as $15.

Do you have a better way to avoid getting your email labeled as Spam? Well, do share it in the comments section below.

Cloudways thanks Simon Walker for this contribution. Simon is a professional ecommerce consultant currently working for FmeExtensions, a company known for its easy-to-use Magento Extensions.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Great speed, features, knowledgebase, dashboard, UX and fast, expert support. Very happy!”

Stefan [Management Consultant]

Fayyaz Khattak

Fayyaz, a passionate Motorbike tourist, works as a Team Lead — Magento Community at Cloudways - A Managed Magento Hosting Platform. His objective is to learn & share about PHP & Magento Development in Community. You can contact him at [email protected]


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Unleash The Cloud.
Not Budgets.

For 4 Months +
Up To 30 Free Migrations

Cyber Week

Time Left In Offer
  • 0


  • 0


  • 0


  • 0


40% OFF

On All Plans