How to configure SMTP server and sender email in your WordPress site?

0
65

Once in a while, we all have faced trouble sending emails. Is the internet connection down? probably no. Your emails could be reaching spam folder instead of inbox. There are a number of things that could be the issue.

One of the reasons could be the incorrect setup of SMTP. The SMTP(or Simple Mail Transfer Protocol) is an internet standard for email transmission, particularly for sending emails. This is one of most common reasons for not sending emails errors. By properly setting up your WordPress hosting server to use the wp_mail function, this error can be solved.

When it comes to WordPress, PHP uses the wp_mail function to send emails. This function may not work if you are using a third-party hosting service. Hence in such case, you can request your hosting service provider to configure SMTP for your site.

In this article, I’ll discuss some basic methods to configure SMTP on your WordPress site.

Using a WordPress Plugin

One method is to install WP Mail SMTP plugin on your WordPress site. Basically, this plugin reconfigures the wp_mail function to send emails using proper SMTP provider.

LearnWoo | WP Mail SMTP
WP Mail SMTP Plugin

Once you have installed and activated the plugin, you can choose the desired mailer for the SMTP setup. For Gmail SMTP, you can refer this article, for the Mailgun, refer this article, and for SendGrid mailing service, refer this article. In addition to this, the plugin offers an option for all other SMTP email services. The last option can be used if you are using a third-party hosting service provider.

Download the plugin here.

Using Third-Party Email Services

If you wish to do away with the responsibility of maintaining the server, you can opt for a third-party email service. These email services provide hosting service for your website and also handle all configurations related to your email transmission.

Here are the three most popular third-party email services:

1. G Suite (Google Apps for Work)

G Suite is one of the most useful offerings from Google. It is a SaaS-based solution that comprises of Gmail, Calendar, Google+, Hangouts, Drive, Docs, Sheets, Forms, Slides and so on depending on the chosen plan. Although these features are available for free, the G Suite offers services like creating a custom domain name, unlimited storage, and advanced administrative tools.

LearnWoo | G Suite
G Suite – Google Apps for Work

What makes G Suite more advantageous than others is that the accessibility and control of all your work are simple and secure. The data is synchronized across all servers, hence allowing you to access the data on any device anywhere.

Explore G Suite now!

2. Mailgun

Mailgun is another fine email service that has a lot to offer. From sending & receiving emails, inbound routing to email tracking, this email service lists some of the most productive emails functionalities.

LearnWoo | Mailgun
Mailgun

Check out Mailgun!

3. SendGrid

This email delivery service manages emails that involve shipping notifications, email newsletters, promotional emails to name a few. Although the service is mainly intended for email marketing and campaigns, it also provides email API service for email deliverability.

LearnWoo | SendGrid
SendGrid

The integration process is fast and easy. You can define different access restrictions and enable account sharing by specifying access levels. SendGrid also includes different levels of security for email transmission.

These are just some highlights of this service, you can look into more details on the official website.

Configuring Postfix as Send Only SMTP Server

In this method, you should install and configure Postfix(an open source mail transfer agent) on your server. A mail transfer agent or MTA is an application used for mail transmission in the form of a client-server application structure.

This method is practical when using cloud servers. If you are using a third-party email service, you do not need to run this email service and could try alternate ways.

Also, an important point to remember is that this method is applicable for Linux servers, which shouldn’t be a problem, considering most of the servers are Linux-based. All you need is a Linux-based server Droplet with sudo privileges and a valid domain name. For a complete step-by-step tutorial read this documentation.


For more WordPress troubleshooting tips, read this blog article.

And more amazing blog articles, continue exploring LearnWoo!