1. Documentation /
  2. Email & SMTP Providers

Email & SMTP Providers

This document aims to explain how email works. It also explains the role SMTP providers play in ensuring your shop’s emails are delivered to your customers. Understanding how email works is a big part of keeping your WooCommerce shop’s emails running smoothly.

Related documents for additional reference:

How does email work?

↑ Back to top

Imagine sending an email as sending a letter through the network of a fast-moving postal service. It requires multiple steps:

  • Something has to inspire you to write a letter.
  • You have to write the letter.
  • You choose how to mail it.
  • You apply postage.
  • You provide the letter to your preferred postal service.
  • The postal service takes over from there.

Instead of going straight from your mailbox to your friend’s, the letter travels through various postal centers. Each center checks the details and delivery address before sending it on to the next facility. This process repeats until it finally reaches your friend. 

Much like a letter, your email needs to be:

  • Triggered
  • Created
  • Authenticated
  • Passed to a mail server
  • Sent

From there, like hopping from one post office to another, your email moves across different computers on the Internet until it is received and verified by the receiving server. Once the receiving mail server ensures your email isn’t spam, your message gets delivered swiftly and accurately to the right inbox.

How Does Email Work in WordPress and WooCommerce?

↑ Back to top

How Emails are Handled in WordPress

↑ Back to top

WordPress has a built-in wp_mail() function to initiate email -sending processes. This is a core function of WordPress, which acts as a bridge, not the actual email sender. WooCommerce and many other plugins utilize wp_mail() to send emails from your site.

Does that mean WordPress sends my email? Is WooCommerce sending the email?

↑ Back to top

Neither WordPress nor WooCommerce directly sends your emails. 

  • After generating the email content, WooCommerce triggers the wp_mail() function. 
  • This function signals WordPress to process the email. 
  • However, since WordPress isn’t an email server, it delegates this task to PHP. 
  • PHP then locates a local email server on your web server to dispatch the email. 

Thus, your email takes a three-step journey before it even leaves your web server.

How does a Dedicated SMTP provider fit in?

↑ Back to top

To employ a dedicated SMTP service, you can use a specific plugin provided by the SMTP service or a universal SMTP plugin that can connect to any provider. These tools adjust the wp_mail() function’s pathway, directing emails from PHP to your chosen SMTP provider. The SMTP service then queues and sends out your emails through its infrastructure.

Integrating a dedicated SMTP provider offers significant advantages for your store’s email communications. Here are three key benefits:

  1. Enhanced Deliverability: SMTP providers specialize in email delivery, helping to ensure your emails consistently reach your customers’ inboxes, bypassing common issues like being marked as spam.
  2. Scalability: As your store grows, an SMTP provider can handle the increasing volume of emails without compromising speed or reliability. A local email server might struggle under heavy loads.
  3. Detailed Analytics: Many SMTP services provide valuable insights into your email performance, including delivery rates, open rates, and click-through rates. This data can help you refine your email strategies.

Adopting a dedicated SMTP service not only streamlines your email delivery process but also contributes to a more robust and efficient communication channel with your customers.

Suggested dedicated SMTP providers

↑ Back to top

These are dedicated SMTP providers that work for most websites. Each has their own plugin on WordPress.org, can be installed from your WordPress dashboard, and has support available to help you get started.

The team at MailPoet wrote an article about SMTP and WordPress, which you may find useful.

Can I use Gmail as my SMTP provider?

Yes, but the setup process is a bit complex, and you may run into sending limits. 

Gmail will disable your account if you send emails to more than 500 unique recipients in a 24-hour period. This includes emails you send through the Gmail web interface and all emails your website is sending. You can read more here.

If you’re certain you’ll fall under these usage limits, there are free plugins available on WordPress.org that can help you get Gmail set up as your SMTP provider. There are also guides from other members of the WordPress community illustrating the process.

Email delivery and spam filters

↑ Back to top

Understanding why some emails get lost and don’t reach your inbox or spam folder can be confusing. Understanding how spam filters work can help you make sense of why they might stop some emails but not others.

Why Do Emails Get Blocked?

It’s challenging to pinpoint the exact reason for emails getting blocked without looking into server logs and email routes. However, here’s a simplified explanation:

  • Spam filters don’t just look for obvious spam content. They evaluate several factors such as:
    • The IP address sending the email, 
    • The sender’s details (including the domain and whether the email is authenticated)
    • The volume of emails sent from that IP or sender, 
    • How often emails from that sender are marked as spam, 
    • The specific wording and formatting of the emails.
  • A key issue often lies in the email’s point of origin. This affects your “reputation” with spam filters.

Even small differences in how WooCommerce emails are composed or formatted can tip the scales, leading to them being flagged as spam and blocked. Not Authenticating your site’s emails can also cause deliverability issues. For more details on Email Authentication, check this document.

If emails are being blocked by spam filters, why is it not in my spam folder?

When emails bypass your inbox and don’t appear in your spam folder, it’s often because an external spam filter intercepts them before they reach your email client. The final spam filter your emails encounter is the one associated with the email client, which operates based on your settings and how you’ve previously interacted with similar emails. If an email is blocked by an earlier filter, it simply won’t be delivered, which bypasses your personal spam folder entirely.


↑ Back to top

SenderScore by ReturnPath

↑ Back to top

Check and monitor the reputation of your website’s IP address for sending emails, if you have your own dedicated server for sending emails. For both shared and virtual hosting environments, using a dedicated SMTP provider is advisable, as these environments are typically not optimal for sending emails. Visit Senderscore.org to learn more.