Configure SMTP access for WordPress

Using 'WP Mail SMTP' by WPForms

Lachlan

Last Update 5 months ago


This topic covers processes relating to a cPanel service.
You will need to be logged into the cPanel account to follow the steps. If you're not sure how to access your cPanel service — please, follow this guide before continuing: How do I login to cPanel?


WordPress, by default, will use 'PHPMail' to send email. However, the way these emails are sent no longer qualifies as best practice due to the ever-increasing levels of spam emails being sent across the internet.

As a result, email providers have begun to implement rules based on how the email was sent and often mail sent via 'PHPMail' can be classified as junk and filtered accordingly once it reaches the destination.


To reduce spam and follow security best practices, on our hosting services, all SMTP requests need to authenticate on the local server.


To do this, we recommend configuring an SMTP service for WordPress to use, and by doing so all mail sent by the website will then use this mechanism (authenticate on the local server) instead. As a bonus, you have more control over how email is delivered, and the setup is very easy.

Creating an Email Address in cPanel

If you already have a cPanel email address setup, feel free to skip to the "Installing and Configuring WP SMTP Mail" steps


To configure your site to send mail via SMTP, you'll need an email address set up within your hosting/cPanel account.


NOTE: The email account that you create in cPanel does not need to receive mail and there is no requirement for mail to be serviced by cPanel either. The account is only used for authentication – adjust your ‘From Email’ in WP SMTP Mail to an address that you can receive email to.

1. First, login to cPanel
2. Then, click on the 'Email Accounts' tool

3. Click the '+ Create' button

4. Fill in the details of the new address

i.e. username, password and optional settings, if required
5. Click the '+ Create' button at the bottom when you're ready

6. Make sure to note the full address and password for later use.


For more detailed instructions on creating email addresses in cPanel, please see the following guide: How to Create Email Accounts in cPanel.

Installing and Configuring WP SMTP Mail

Now that you have an email address created in cPanel, you can move on to the WordPress admin area of your website.

7. Login to your website's admin area

(default login URL: yourdomain.com/wp-admin)

8. From the left side menu, navigate to Plugins >> Add New Plugin
9. In the 'Search plugins...' box, type 'WP Mail SMTP'

10. The first result will be 'WP Mail SMTP by WPForms', click 'Install Now'

11. Once installed, click the 'Activate' button

12. Next, from the side menu, navigate to WP Mail SMTP >> Settings
13. Set the 'From Email' and 'From Name' to your desired address and name

14. Scroll down to the 'Mailer' options, you'll see a list of popular mail providers

15. Select the 'Other SMTP' option.

16. Next, you'll need to fill in the SMTP information using the details below and the email credentials we noted earlier in the guide.
SMTP SETTINGS

SMTP Host: localhost
Encryption: none
SMTP Port: 25
Authentication: ON
SMTP Username: your full email address
SMTP Password: password for this email account


17. Next, scroll to the bottom and click 'Save Settings'

18. To send a test email, click 'Tools' from WP Mail SMTP's options in the left side menu

19. Fill in the recipient's email address and click 'Send Email'

20. That's it! You're done.

Your site should now be configured to use the email address you created to send mail from the hosting service.

NOTE: Make sure to check that your domain has an SPF record containing WP Hosting's SPF details - " include:_spf.wphosting.com.au ". Please see our guide, 'Adding an SPF record to your DNS Zone', for more information.

You can choose to use a different SMTP plugin if you like, however in our experience the plugin we’ve recommended, 'WP Mail SMTP', continues to be reliable and performs well.


The same settings will work in other plugins as well, simply adjust your application according to your specific needs.

Still need help? Message Us