SMTP on Wordpress

How to Use SMTP on WordPress to Send Mails – Step by Step

WordPress is popular and comes with many awesome features built into it. There are still a few basic setups to be done for a smooth-running website. In this post, we will focus on how WordPress sends emails usually and how it should.

WordPress by default uses the PHP mail function to send emails. This is neither effective nor a recommended way to send emails. Also many Web-hosting providers, do not allow sending emails through scripts, especially on shared hosts, and this might result in your emails not being sent from your WordPress website.

You can test if your emails are being sent or not. Use a mail tester plugin like WP Test Email for WordPress.

These problems are very common in many WordPress installations. The solution is to use a third-party email services provider like Gmail, Mailgun, Sendgrid or your very own SMTP server. There are many plugins out there that add SMTP configuration panel to the WordPress settings menu. One such popular plugin used for SMTP setup as well as third-party email service integration is WP Mail SMTP which is popular easy and includes the ability to test the setup with test emails.

This plugin offers a wide range of email service providers that you can integrate into your WordPress installation to send email through. Using these third-party email service providers helps you be sure that your emails are delivered as they should and at the same time offer you the ability to track clicks and views more efficiently.

In this guide, you’ll learn how to set up WordPress to use an existing local or remote SMTP server to send emails through.

Setting Up the WP Mail SMTP plugin

The WP Mail SMTP plugin can be installed from the WordPress plugins store. After you install the plugin it will appear in the sidebar “WP Mail SMTP”. Click the link and you will be taken to the setup page. These are the list of providers supported by the plugin at the time of writing this post.

To use an SMTP server, you’d need to select the option that says “Other SMTP” (bottom right). Now the menu options will be shown below, you need to fill the appropriate information.

These fields appear right after you select the “Other SMTP” radio button. Now here you’d need to fill the following fields with correct values as per your SMTP server. Below the image, you can find detailed info on what values to use in the fields.

Configuration Options

  • SMTP Host: This field requires the name of the SMTP host, the IP address or a domain name where your SMTP server resides. For example, if your SMTP server is located on a subdomain (on most shared hosts) like, you need to fill that same thing here. You may also use “localhost” if the SMTP server resides on the same server as your WordPress site.
  • Encryption: If encryption is enabled on your SMTP server, choose the appropriate mode from “None”, “SSL”, or “TLS”. Changing the encryption type will automatically configure the correct connection port to the SMTP Server or If you need to manually enter the port you can do that too right below in where the port number appears.
  • Auto TLS: The Auto TLS option automatically switches on the Transport Layer Security if your SMTP server supports it. This option generally remains off.
  • Authentication: This option is used for enabling or disabling authentication. Incase your SMTP server requires a username and password, this authentication must be enabled.
  • SMTP Username: The SMTP Username field is where you need to fill the username that you use on your SMTP server. In most cases, it is the same username you use to login to your webmail. like
  • SMTP Password: The SMTP Password field is where you fill the password for the SMTP server corresponding username. This is also the same password you use with a webmail login username.

Huh!! Now if you have completed the form you save the settings and move to another tab to test if the SMTP server is working correctly and mails are being sent.

Fill the “Send To” field with your email address and press the “Send Email” button to confirm mails are being delivered. If the test mail is sent successfully, check your inbox to confirm.


This is a simple guide to help you configure your WordPress site to use an SMTP server for sending emails. The plugin demonstrated here “WP Mail SMTP” has other many premium features, you should check that on the plugin info page for more details.

If the guide above does not work for you or you get an error message or any other problem, you can comment below for help.

Leave a Reply