How to send WordPress email through SMTP

Stop WordPress password resets, contact forms and order emails going missing by sending through an authenticated mailbox with an SMTP plugin.

Guide2 min readLast updated
On this page
  1. 1. Create a sending mailbox
  2. 2. Install an SMTP plugin
  3. 3. Enter the settings
  4. 4. Send a test
  5. Contact forms
  6. Keeping the password safer
  7. Common questions

By default, WordPress sends mail through PHP’s basic mail function, often with a From address like wordpress@yourdomain.co.uk that doesn’t exist. Receiving servers treat that with suspicion. Sending through a real mailbox fixes it.

1. Create a sending mailbox

Create website@yourdomain.co.uk (or similar) in E-mail Manager › E-mail Accounts. How to create an email account in DirectAdmin

2. Install an SMTP plugin

In Plugins → Add New, search for SMTP and install a well-maintained SMTP plugin with a large number of active installations. Configure it with “Other SMTP” as the mailer.

3. Enter the settings

SettingValue
From Emailwebsite@yourdomain.co.uk
Force From EmailOn
From NameYour site name
SMTP Hostmail.yourdomain.co.uk
EncryptionSSL
SMTP Port465
AuthenticationOn
Usernamewebsite@yourdomain.co.uk
PasswordThe mailbox password

Use TLS with port 587 if SSL on 465 doesn’t connect.

4. Send a test

Use the plugin’s test email to send to an outside address, such as Gmail. In Gmail, Show original should show SPF and DKIM passing.

Contact forms

In your form plugin, set:

  • From: website@yourdomain.co.uk
  • Reply-To: the visitor’s email field

Never set From to the visitor’s address. Sending email from your website reliably

Keeping the password safer

Many SMTP plugins let you define the password in wp-config.php instead of the database. Use that option if offered.

Prefer to follow along?

Not hosting with Traxio yet? WordPress hosting from 99p a month is £0.99 a month.

Common questions

How do I add a contact form to my website?

Install a form plugin from Plugins → Add New, build the form and place it on a page with its block or shortcode. Then set up SMTP, or the form will appear to work while the emails silently never arrive.

That second step is the one people skip. WordPress sends mail through PHP by default and most providers now distrust it, so a contact form without SMTP configured is the single most common “my form is broken” cause.

Why doesn’t WordPress send email?

By default WordPress sends mail through PHP, which most providers now distrust, so the messages disappear silently. Install an SMTP plugin and configure it to send through a real mailbox on your domain — password resets and contact forms start arriving.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going