How to Configure WordPress to use SMTP for Sending Emails

Modified on Thu, 02 Jun 2022 at 11:29 PM

Why use SMTP from WordPress instead of PHPMail()?

By default, WordPress will send emails using a protocol called ‘PHPMail()’, which has a number of disadvantages and in many cases leads to the email hitting the SPAM folder of the recipient. PHP mail is disabled on our servers.

When an email is sent from WordPress, such as a contact form the message is delivered via PHPMail, which will use an email address similar to…

youruser@your.servername.com

In our case, this would be…

youruser@hotel.cloudns.io

Yet, your WordPress configuration will be set to send emails from an alternative ‘prettier’ email address, such as ‘you@yourdomain.com’.

The problem here is that many recipient mailboxes will recognise this as ‘spoofing’, and will indeed flag the message as SPAM.

MailChannels and PHPMail()

Please note that all outbound mail is relayed via a premium delivery / SMTP service called ‘MailChannels’. This is provided free of charge with each account, and is designed to ensure the highest delivery rates possible in the hosting industry.

Important: When using PHPMail() instead of the recommended ‘SMTP’ for WordPress emails, your emails will not be relayed via MailChannels at all, and therefore also imposes risk of IP blacklists affecting email delivery to your clients.

Configure WordPress to send via SMTP

We have an excellent guide on how to configure SMTP with your WordPress application here…

HOW TO CONFIGURE SMTP WITH YOUR WORDPRESS APPLICATION 

Do note that while the above guide will use ‘kilo.cloudns.io’ for the server host this will differ depending on the server your service is currently on.

Also in most cases, you would be able to use ‘mail.yourdomain.tld’ as the hostname

The SMTP details for your mail accounts can be found by logging in to cPanel, then going to…

Email Accounts -> ‘Connect Devices’

From here, you will be provided with the SMTP configuration details required to connect your email client to your mailbox.

The settings are as follows…

Secure SSL / TLS Settings:

Username: Your email address
Password: The password to access the email address
Outgoing Server: mail.yourdomain.com (replacing ‘yourdomain’ with your actual domain name)
TLS Port: 587

What if I am using an external email service?

If you are using another provider for emails, then you would need to obtain the SMTP server and credentials from your provider for use within the plugin.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article