How to Configure WordPress to use SMTP for Sending Emails Print

  • SMTP, WordPress
  • 0

Why use SMTP from WordPress instead of PHPMail()?

By default, WordPress sends emails using a protocol function called ‘PHPMail()’. It is easy to set up - it is built-in - but it has a number of disadvantages and in many cases leads to the email hitting the SPAM folder of the recipient.

When an email is sent, PHPMail will use an email address similar to youruser@your.servername.com. In our case, this would be youruser@server.cloudns.io 

However, WordPress is configured to send emails from an alternative ‘prettier’ email address, such as ‘you@yourdomain.com’. The problem here is that because the actual sending email address does not match the 'prettier' email address many recipient mailboxes will label this as ‘spoofing’, and will indeed flag the message as SPAM and filter it out completely.

MailChannels and PHPMail()

Please note that with Skylime, 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 outside of email delivery specialists.

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.

It is always recommended to enable SMTP through WordPress.

Configure WordPress to send via SMTP

To begin, first you need to install a plugin named WP Mail SMTP by following the instructions in our tutorial on how to install WordPress plugins (note: there are other SMTP plugins that do the same job). Once the plugin is installed and activated, a new menu will show up under the Settings section called Email. You will need to navigate to it in order to configure WordPress to work with SMTP.

 

select WP Mail SMTP

 

On this page you will see several configuration options available:

 

configure WP Mail SMTP

 

Here’s a list of all of them and what they configure:

  • From Email – the email address you want to send emails from – for example email@yourdomain.com;
  • From Name – the name that your emails will be sent from;
  • Mailer – choose whether you want to use the Default PHP mail() function, a Gmail/G Suite account, Mailgun, SendGrid, SMTP.com, Sendinblue, Amazon SES, Outlook, Zoho Mail or other SMTP server. Choosing the Default mode would send the messages using the PHP mail() function without SMTP authentication. The Gmail/G Suite, Mailgun and SendGrid, etc, options require additional info such as Client ID and Client Secret or API key that should be obtained by the respective provider. The Other SMTP server option would prompt you to enter additional configuration details which we will describe below.
  • Return Path – check if you want to match the return path for your emails to the sending email;

Advice

If you want an emailer account, probably the best free option is Sendinblue (free below 300 emails per day). If you are willing to pay, SMTP.com is rated very highly.

Mailer > Gmail

If you choose Mailer > Gmail, there are clear step-by-step instructions on the plugin author's website - https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/.

It will take you about 10-15 minutes if you follow the step-by-step instructions (it has helpful accurate screenshots). You will need to be logged into your website (https://yourwebsitename.co.uk/wp-admin) and your Google account at the same time. Following the instructions your Google account will generate 2 keys which you will have to copy & paste into your website account.

Mailer > Other SMTP

If you choose Other SMTP as a mailer, you will be prompted to add the SMTP server’s configuration settings. You can find your Skylime SMTP details in your account cPanel under Email > Email Accounts > email account name > Connect Devices, or in your Account Setup email. There are also many other SMTP services that you can use as well as those listed, eg. Mailjet, SMTP2GO, Moosend, Mandrill, PepiPost, etc, etc.

  • SMTP Host – the hostname for your SMTP server;
  • SMTP Port – the port your server works on;
  • Encryption – if you have SSL/TLS encryption available for that hostname, select it here;
  • Auto TLS – if your server supports TLS encryption, enable this option;
  • Authentication – check if your SMTP server requires authentication;
  • Username – the username for your SMTP server;
  • Password – the password for your SMTP server;

Once you configure those parameters, simply click the Save button at the bottom of the page.

If you choose your Skylime cloud hosting account for your SMTP server, please configure as in diagram below:-

 

other SMTP server configuration

 

Test

When this is complete it is a good idea to test that the configuration works. Select the Email Test tab and fill in an email address to receive the test email, then click Send Email.

If successful you will receive a test email -

test email screenshot

 

Other Resources About SMTP

WP Mail SMTP - A Complete Guide to SMTP Mailers


Was this answer helpful?

« Back

Powered by WHMCompleteSolution