If your WordPress site’s emails keep landing in spam or fail to send, the WP Mail SMTP plugin can fix that.
This simple tool lets you send emails through a trusted SMTP service instead of your web server, improving deliverability and ensuring important messages—like order confirmations, password resets, and contact form submissions—reach the inbox.
In this guide, you’ll learn how to install, set up, and test WP Mail SMTP on your Cloudways-hosted WordPress site, along with tips to boost email reliability using SPF, DKIM, and DMARC records.
Table of Contents:
Configure SMTP for WordPress Emails Using WP Mail SMTP
This KB explains how to configure SMTP service for transactional (outgoing) emails on a WordPress application.
We will also show you the simple process of setting the email headers (From Name and Sender Email etc.) through this plugin.
Additionally, this guide includes instructions for configuring Elastic Email as another SMTP service option.
How to Install and Configure WP Mail SMTP Plugin to Send Emails
Step #1 - Install and Activate the WP Mail SMTP Plugin:
The first step of the process is the installation of the WP Mail SMTP plugin. For this log into the WordPress admin area of your site using the admin credentials.
In the left admin menu, click on Plugins, and then on Add New.
Locate the SMTP plugin via the search bar (WP Mail SMTP by WPForms for the purpose of this KB). Next, click the Install Now button.
Once the installation finishes, click the Activate button.
Step #2 - Configure Sender Name and Email Address:
To start the configuration process, visit the Plugins section in the left admin menu and locate the SMTP plugin. Click Settings to start the configuration process.
You will see the following screen with three major options.
From Email:
In this field, enter the email address that you wish to set as the From email. This is the email address that will appear on all outgoing emails.
Depending upon your requirements and the target audience, this email could be [email protected] or [email protected].
It is also recommended to check the Force From Email checkbox to override any other SMTP configurations.
From Name:
In the From Name field, enter the name you wish to appear on your outgoing emails.
A recommended practice is to check the Force From Name checkbox to override previous website settings.
Step #3 - Configure SMTP Service:
Select any of the below two methods.
PHP Settings (Default)
If you have configured server-wide SMTP on your server where your application is hosted, you can simply select PHP as a Mailer.
Other SMTP Settings (Optional)
If you haven’t configured server-wide SMTP or you want to use a different email service for your application, you can select any reliable service (such as MailGun, SendGrid, etc.) or choose Other SMTP.
Elastic Email can also be used with WP Mail SMTP by selecting "Other SMTP" in the mailer options and using settings such as Host: [smtp.elasticemail.com](https://smtp.elasticemail.com), Port: 2525 or 587, Protocol: TLS, Username: Elastic Email API Key, and Password: Elastic Email API Key.
In this KB, we are using MailGun as an example. If you are using any other SMTP, contact your email service provider for the recommended settings.
You can find your API Key from your Mailgun’s Control Panel as stated in their support KB.
Copy the key and then return to the WP Mail SMTP settings and paste it under the Private API Key field and then enter your Domain Name.
Once these settings are saved, you’ll be ready to try sending a test email. Ensure that you also verify your Elastic Email account and domain using their dashboard to avoid interruptions.
We also recommend checking the optional Return Path checkbox to Set the return-path to match the From Email.
With this enabled, you will receive an email in the case where any messages bounce (mainly due to any issues with the recipient’s email service).
Step #4 - Verify SMTP Settings:
Now that the SMTP settings have been added to the WP Mail SMTP plugin, it is important to send a test email to ensure that everything is working properly.
To do this, click the Email Test at the top of the plugin screen.
In the Send To field, enter a valid email address (that you can access), and click the Send Email button. If everything goes well, you will see a success message.
Check the inbox to confirm that you have received the test email.
That’s it! You’ve successfully configured SMTP for your WordPress site. You’ll now start getting notifications from your WordPress forms.
Step #5 - Add an SPF Record at Domain Registrar (Recommended):
To avoid any issues with the outgoing emails, we highly recommend adding an SPF record about your preferred email service provider at your Domain Registrar.
For Elastic Email, the recommended SPF record is:
v=spf1 a mx include:_[spf.elasticemail.com](https://spf.elasticemail.com) ~all.
Additionally, add a _dmarc TXT record: v=DMARC1;p=none;pct=1;aspf=r;adkim=r; and a CNAME record for tracking: tracking -> [api.elasticemail.com](https://api.elasticemail.com).
For this, log into your Domain Registrar. Navigate to Domain Management and then add a new record with the following values:
Type: TXT
Host: Enter your server public IP address
TEXT Value: Add the SPF record as per your SMTP service provider’s recommendation.
TTL: Choose the lowest value
Click Save to apply the settings.
Common Troubleshooting Scenarios for Elastic Email
Emails Are Not Being Delivered: Ensure your sender address uses a verified domain (e.g.,
[email protected]) and confirm the domain is verified in Elastic Email. Check for typos in the API key or SMTP port.Monthly Email Limits Are Full: Upgrade your package or wait until the limit resets at the start of the next month.
Stale Email Addresses: Minimize email bounce rates by sending to engaged recipients only.
Avoiding Common Missteps
Do not use public domain addresses (e.g., Gmail or Yahoo) for sending emails as Elastic Email requires verified custom domains.
Regularly verify DNS records are correct and up-to-date.
Keep Elastic Email API keys secure and updated if regenerated.
That’s it! We hope this article was helpful.
Need Help?
If you need assistance, feel free to:
Visit the Cloudways Support Center
Chat with us: Need a Hand > Send us a Message
Or create a support ticket anytime.
We're here 24/7 to help you!












