Reliable WordPress Email with External SMTP Integration

Share this article

As a webmaster you probably find yourself scrambling to complete various tasks to keep your site functional. While it’s easy to focus on visual items such as the design or enabling key functionality, many WordPress owners make the mistake of not connecting their sites to an SMTP server. Whether you’re intimidated by the thought of customizing your site or just haven’t thought of this aspect, SMTP can be integrated with ease through off the shelf plugins.

The Built in WordPress Mail Function

By default, WordPress comes with a built in mail function known as wp_mail. This is a wrapper for PHP’s mail() function which typically uses Sendmail for sending emails.

Unless you edit the wp_mail function, as discussed on the WordPress Codex, the default subject line for your messages will be “WordPress” and the default sender email address will be wordpress@yoursite.com.

Unfortunately on many WordPress websites, using the default mail server doesn’t work due to hosting restrictions (due to spam controls) or conflicts with other plugins. If you have a security plugin for example, those are known to be a major culprit of this function not working.

Rather than trying to troubleshoot wp_mail() issues or having the default mail server stop working without your knowledge, it’s best to avoid using the wp_mail() function as much as possible.

WordPress SMTP Integration

Below are a couple of leading solutions for replacing the default mail function on your site. Keep in mind that some online services such as Gmail place significant restrictions on allowing external sites to send email through their server. For the most part you’ll need to use a paid email provider (or the email server on your host) for this capability to work.

WP Mail SMTP

With over 300,000 active installs, WP Mail SMTP is one of the most popular external email tools on the WordPress codex. The tool simply reconfigures the wp_mail() function to use SMTP instead of the PHP mail() function and creates a control panel for you to enter your settings.

The plugin is designed to work with virtually any online email service as long as it supports SMTP.

WP Mail SMTP

Easy WP SMTP

Although it isn’t as popular as WP Mail SMTP, Easy WP SMTP has over 40,000 active installs. The plugin profile mentions that the tool is inspired by the WP Mail SMTP plugin however it doesn’t look like there are significant differences between the two.

Easy WP SMTP

Specialized Email Situations

Although integrating WordPress with a standard SMTP server is essential for administrative tasks, it isn’t ideal for all communication needs. Below are a couple of the most notable cases which fall under this umbrella:

Transactional Email

As discussed in a previous article on SitePoint, transactional email is an essential component for websites which need to send notifications to users. For example, eCommerce websites need to send order updates to customers while blogs and forums might alert users to replies on posts.

In order to ensure that these emails get to your users, you should use a dedicated provider specializing in this space rather than traditional email systems. Two major players in this space are SendGrid and Mandrill.

Both providers offer free plans with reasonable amounts of resources for many websites, and for those times when you’re running a larger scale property, the paid plans are relatively reasonable.

Email Newsletters

Similar to transactional email, if you run email marketing campaigns, these should not be done through a standard email server. This is because many shared hosts place significant restrictions on the amount of emails which can be sent per hour.

Users on virtual private servers (VPS) and dedicated systems aren’t subject to the same limits, but they can still risk having your IP address blacklisted, causing your emails to go into customer spam folders regardless of your content.

Even if you have a dedicated IP address, there’s always the possibility the previous owner of the IP address used it for malicious purposes. Although it’s possible to remove the black marks against your server, the process requires a bit of effort and can take significant amounts of time.

A Must Have for Any Server

Even if you don’t plan on sending emails directly through WordPress, you should always link your WordPress site with an SMTP server it allows essential administrative notices to be sent to you.

There are plenty of plugins which conflict with the default WordPress mail function, and sometimes servers will block the php mailer function for security reasons. Considering the ease of implementing SMTP in WordPress, there’s almost no reason why you shouldn’t do this today.

Frequently Asked Questions about WordPress Email External SMTP Integration

What is the importance of using an external SMTP server for WordPress emails?

An external SMTP server is crucial for WordPress emails because it significantly improves email deliverability. Unlike the PHP mail function that WordPress uses by default, an SMTP server ensures that your emails reach the recipient’s inbox and not their spam folder. It does this by authenticating all outgoing emails, proving to ISPs that your emails are legitimate and should be delivered as intended.

How can I configure WordPress to use an external SMTP server?

Configuring WordPress to use an external SMTP server involves installing and setting up an SMTP plugin. The WP Mail SMTP plugin is a popular choice. After installing and activating the plugin, you’ll need to enter your SMTP server details in the plugin’s settings. These details include the SMTP host, SMTP port, encryption type, and your email login credentials.

Can I use an SMTP server without a plugin in WordPress?

Yes, it’s possible to use an SMTP server without a plugin in WordPress. This involves editing your wp-config.php file to include your SMTP server details. However, this method is not recommended for beginners as it requires a good understanding of PHP and WordPress internals. Using a plugin is much safer and easier.

What are the best SMTP service providers for WordPress?

There are several reliable SMTP service providers suitable for WordPress. These include SendinBlue, Mailgun, SendGrid, and Amazon SES. Each of these providers offers different features and pricing plans, so you should choose the one that best fits your needs.

How can I troubleshoot issues with my WordPress SMTP setup?

If you’re having issues with your WordPress SMTP setup, start by checking your SMTP server details for any errors. Make sure you’ve entered the correct SMTP host, port, encryption type, and login credentials. If everything seems correct, try sending a test email to see if you receive any error messages. The error messages can provide clues about what’s going wrong.

Can I use Gmail’s SMTP server for my WordPress emails?

Yes, you can use Gmail’s SMTP server for your WordPress emails. However, keep in mind that Gmail has strict sending limits, which might not be sufficient for larger websites. Also, using Gmail’s SMTP server requires creating a specific App password in your Google account, which adds an extra step to the setup process.

How can I secure my WordPress SMTP setup?

To secure your WordPress SMTP setup, always use encryption (SSL or TLS) when entering your SMTP server details. This ensures that your email login credentials are not sent in plain text. Also, use a strong, unique password for your email account to prevent unauthorized access.

Can I use multiple SMTP servers in WordPress?

Yes, it’s possible to use multiple SMTP servers in WordPress. This can be useful if you have a high email volume and want to distribute the load across several servers. However, setting this up requires a more advanced SMTP plugin that supports multiple SMTP servers.

Why are my WordPress emails going to the spam folder?

If your WordPress emails are going to the spam folder, it could be due to several reasons. The most common reason is that your emails are not being authenticated by an SMTP server. Other reasons could include your email content being flagged as spam, or your email server being blacklisted by ISPs.

How can I improve the deliverability of my WordPress emails?

To improve the deliverability of your WordPress emails, always use an SMTP server to authenticate your emails. Also, make sure your email content is not spammy and complies with CAN-SPAM regulations. Finally, monitor your email server’s reputation to ensure it’s not being blacklisted by ISPs.

Charles CostaCharles Costa
View Author

Charles Costa is a content strategist and product marketer based out of Silicon Valley. Feel free to learn more at CharlesCosta.net.

ChrisBemailmandrillsendgridsmtpWordPress
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week