How to Configure WordPress to use SMTP for Sending Emails

Modified on Sat, 08 Oct 2022 at 02:30 AM

By default, WordPress uses the PHP Mail function to send its emails. However, it is better to use SMTP as it handles sending messages better and you can also use it to send emails from a third party mailing service.

You can watch our short video on how to configure your SMTP credentials on the server:

Alternatively, follow these steps:

To begin, install a plugin named WP Mail SMTP by following the instructions in our tutorial on how to install WordPress plugins. Once the plugin is installed and activated, a new menu will show up named WP Mail SMTP. You will need to navigate to it to configure WordPress to work with SMTP.

On this page you will see several configuration options available:

Here’s a list of all of them and what do 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/Google Workspace account, Mailgun, SendGrid or other SMTP servers. Choosing the Default mode would send the messages using the PHP mail() function without SMTP authentication. The Gmail/Google Workspace, Mailgun and SendGrid 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 would describe below.
  • Return Path – check if you want to match the return path for your emails to the sending email;

If you choose other SMTP servers as a mailer, you would be prompted to add the SMTP server’s configuration settings.

  • SMTP Host – the IP or hostname for your SMTP server. You can find the server hostname for your SiteGround website in Site Tools -> Email -> Accounts -> kebab menu -> Mail Configuration -> Manual Settings tab;
  • 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 email address you want to send emails from – for example, email@yourdomainname.com;
  • Password – the password for the email address you have set in the Username field;

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

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