WordPress Email Configuration for Sending an Email
Posted in: Email, WordPress

WordPress Email Configuration for Sending an Email

If you are facing any issues in sending an email in WordPress, then this guide is for you. Here, we discuss how to configure your WordPress so it can send emails properly.

The email configuration that may work for you will depend upon the hosting provider. So, we take two different cases either when you use shared hosting of GoDaddy, Hostgator, etc. where you have access to cPanel, or when you use VPS (Virtual Private Server) like Digital Ocean, Linode, or Vultr, etc.

Here, we use the plugin WP Mail SMTP by WPForms to configure the sending of an email. This plugin fixes the delivery of an email by reconfiguring the WordPress to make use of the correct SMTP provider when sending the emails.

More specifically, this plugin reconfigures the wp_mail() function of WordPress to make use of the proper SMTP host credentials. By default, WordPress makes use of the PHP mail() function for sending emails which may not work in some cases.

In VPS hosting, you may use SMTP settings from providers like Brevo, Pepipost, SendGrid, etc., to send emails.

However, in the case of shared hosting providers, they generally block SMTP ports and restrict you from using SMTP providers.

First of all, install and activate the “WP Mail SMTP by WPForms” plugin, then proceed to the next step depending upon the type of hosting you use.

Email Configuration in cPanel Powered Shared Hosting

This should also work in managed WordPress hosting as offered by hosting providers in this category.

Here, you can set the “Mailer” to “Default (none)” and then click on “Save Settings”. This will simply reconfigure the wp_mail() function of WordPress.

WP Mail SMTP - PHP
WP Mail SMTP – PHP

Then, you can test sending an email in the “Email Test” tab.

WP Mail SMTP - Send Test Email
WP Mail SMTP – Send Test Email

If this does not work for you, then you can try using “Other SMTP” and input the SMTP details as provided by your hosting provider.

Generally, in shared hosting with cPanel, you get these SMTP details in the “Email Accounts” section of your cPanel.

Email Configuration in VPS (Virtual Private Server)

In VPS environments like Digital Ocean, Linode, etc., you can use SMTP providers like Brevo.

Most VPS hosting providers do not block sending emails via SMTP.

However, if you encounter issues sending emails, it may be because your VPS provider has restricted SMTP ports like 587, 465, or 2525. In such cases, you may need to request the VPS provider to unblock these SMTP ports to send emails.

Note that while Brevo is used as an example here, you may use any other SMTP provider, as the configuration steps are generally similar.

Here, we are going to take Brevo as an example. Select “Other SMTP” in the “WP Mail SMTP” plugin and input the Brevo SMTP details. These are as follows:

  • SMTP Host: smtp-relay.brevo.com
  • Encryption: TLS or SSL
  • Port: 587, 465, or 2525
  • SMTP Username: Your Brevo SMTP login email address
  • SMTP Password: Your Brevo SMTP key

After configuring these settings, you can test sending an email.

Similarly, you can configure any other SMTP provider besides Brevo.

There are many hosting providers that offer SMTP services. It’s not easy to choose between them since each hosting provider has its pros and cons. Now, to find the best email hosting provider with SMTP, you can read this comprehensive guide on email service providers.

Back to Top