Skip to content
WordPress Guide

How to Set Up SMTP in WordPress, Step by Step

The decisions to make before you install an SMTP plugin, the usual settings for Google, Microsoft, Zoho and hosting mailboxes, and how to check the test really passed.

A bright home office desk with a laptop and a monitor
9 sections · 8 min read
In this article · 9 sections

Someone has told you to “put SMTP on the site”, perhaps your host, perhaps a developer, perhaps a forum thread. You understand that it has something to do with your form emails, but the plugin screen asks for a host, a port, an encryption type and a password, and you are not sure which email account any of it refers to.

This post shows how to set up SMTP in WordPress from start to finish: the decisions to make first, the settings for the common email providers, and how to confirm it works. If your emails have already gone missing and you are trying to find out why, start with our guide on WordPress emails that never arrive and come back here for the setup.

What SMTP changes on your site

Without any changes, WordPress hands its emails to the web server’s own mail function. The message leaves without logging in to any real mailbox, so the receiving side has little reason to trust it.

With SMTP, WordPress logs in to an actual email service, the way your phone’s mail app does, and sends through it. Every email the site sends goes this way: form notifications, password resets, new user emails and, on a shop, order emails. It does not change your inbox or how you read mail.

Three decisions before you install anything

1. Which service will send the mail

You have three realistic choices.

Option Suits What you need
Your business email provider (Google Workspace, Microsoft 365, Zoho Mail) Most small sites that send form emails and the odd password reset A mailbox on that service and its sign-in details or an app password
A mailbox from your web host Sites whose email is already hosted with the web host The mailbox address, password and the host’s mail server name
A transactional email service (Brevo, Mailgun, Postmark, Amazon SES, SendGrid) Shops and sites that send a lot of automatic email An account, a verified domain and an API key

Check each provider’s own sending limits and terms before you choose. They vary and they change.

2. Which address the site sends from

Use an address on your own domain, such as website@ or enquiries@yourbusiness.com, and make it an address that service is allowed to send for. A Gmail or Yahoo address as the sender will cause rejections. Our post on the sender name and address WordPress uses covers that choice in more detail.

3. Which plugin

The two widely used ones are WP Mail SMTP and FluentSMTP. Both do the job. Install only one. Two mail plugins, or a mail plugin plus a form plugin that also tries to control sending, will fight over the same setting.

How to set up SMTP in WordPress with WP Mail SMTP

  1. Take a backup, then go to Plugins → Add New Plugin, search for WP Mail SMTP, install and activate it.
  2. The plugin offers a setup wizard. You can follow it, or close it and go to WP Mail SMTP → Settings.
  3. Under From Email, enter the address on your domain. Tick Force From Email so every plugin sends from it.
  4. Under From Name, enter your business name. Tick the force option there too if you want one name on every email.
  5. Under Mailer, pick your provider if it is listed. If it is not, or if you prefer plain SMTP details, choose Other SMTP.
  6. For Other SMTP, fill in the SMTP host, encryption, port, and turn authentication on with the mailbox username and password (see the values below).
  7. Save the settings, then send a test as described further down.

Not every mailer in the list is available in the free plugin. If yours is locked, Other SMTP usually works with the same provider.

Typical SMTP values by provider

Check your provider’s help pages for the current values, but these are the usual ones:

  • Google Workspace or Gmail: host smtp.gmail.com, port 587 with TLS. Google will not accept your normal password here. You need 2-Step Verification switched on and an app password, or you can use the plugin’s Google sign-in mailer instead.
  • Microsoft 365: host smtp.office365.com, port 587 with TLS (STARTTLS). Many Microsoft 365 setups have password-based SMTP turned off, and Microsoft has been moving away from it, so the plugin’s Microsoft sign-in option, where available, is the longer-lasting route.
  • Zoho Mail: the host depends on which Zoho data centre your account uses, for example smtp.zoho.com or smtp.zoho.in. Port 465 with SSL or 587 with TLS.
  • A hosting mailbox: the mail server name your host gives in the email settings of its control panel, often mail.yourdomain.com, with port 465 and SSL or 587 and TLS.

Port 25 is the old default and many hosts block it for outgoing mail, so avoid it unless your provider specifically tells you to use it.

Setting it up with FluentSMTP instead

FluentSMTP is free and works in a similar way. After installing it, open its settings and add a connection: choose the provider or “Other SMTP”, enter the details, and set the sender email and name. Two features are handy for a small business. It keeps a log of emails the site has sent, so you can see whether a form notification actually left. And it lets you add a second connection as a fallback if the first one fails to send.

Using a transactional email service

If you go with Brevo, Mailgun or a similar service, the order of work is different. First create the account, then add your domain inside the service. It will give you DNS records to add, usually for DKIM and sometimes a return-path or SPF entry. Add them at whoever manages your DNS, which may be the domain registrar, the host or a service such as Cloudflare, and wait for the service to show the domain as verified.

Only then go back to WordPress, choose that service as the mailer and paste in its API key. An API key is safer than a mailbox password: many services let you limit what a key can do, and you can revoke it without touching anyone’s email.

The DNS records are what make mail from your domain trusted. If the terms are new to you, our plain explanation of SPF, DKIM and DMARC is worth reading before you edit anything, especially if your domain already has an SPF record that needs the new service added to it rather than a second record created.

Send a test and read the result

In WP Mail SMTP the test is under WP Mail SMTP → Tools → Email Test. FluentSMTP has its own test option in its settings. Send the test to an address on a different service from the one sending, such as a personal Gmail or Outlook account.

  1. Confirm the plugin reports the test as sent. If it shows an error, the message usually names the problem, such as a wrong password or a blocked port.
  2. Check the email arrived in the inbox, not spam.
  3. In Gmail, open the message, use the three-dot menu and choose Show original. Look for SPF, DKIM and DMARC. You want to see PASS against each.
  4. Then submit your real contact form as a visitor would and confirm the notification arrives.

That last step matters because a form plugin can have its own sender settings. Our checklist for testing every form is a good routine to follow from here on.

Keeping the login details safe

By default the plugin stores the SMTP password in the WordPress database. A few habits reduce the risk:

  • Use an app password or API key rather than the main password of anyone’s mailbox.
  • Consider a dedicated sending mailbox rather than the owner’s personal business inbox.
  • WP Mail SMTP can read its settings from the wp-config.php file instead of the database. That is a job for someone comfortable editing that file.
  • If a staff member who set this up leaves, change the password or revoke the key and update the plugin.

Mistakes that undo a good setup

  • Changing the mailbox password later and forgetting the website uses it. Mail stops the same day.
  • Leaving the form plugin’s own “From” field set to the visitor’s email address, which breaks authentication. Put the visitor’s address in Reply-To instead.
  • Creating a second SPF record instead of editing the existing one.
  • Using a personal Gmail account to send for a business domain.

SMTP is one part of keeping the site’s email reliable, and our guide to forms on a WordPress site covers the rest of that section. For where this fits among other site jobs, see the guide to managing a WordPress website.

Frequently asked questions

Does the WordPress SMTP setup affect the email I read on my phone?

No. The plugin only changes how the website sends its own emails. Your mailbox, your phone app and the emails you send yourself carry on exactly as before. The only link is that the website may log in to one of your mailboxes, so changing that mailbox password means updating the plugin too.

Will an SMTP plugin slow down my website?

Not for normal visitors. The plugin only does work when the site sends an email, such as when someone submits a form. Pages that do not send mail are not affected. A very slow mail server can make a form take a moment longer to confirm, which is another reason to choose a reliable provider.

Can I use one SMTP account for several websites?

You can, as long as each site sends from an address that account is allowed to send for and you stay within the provider’s sending limits. For separate businesses or domains, separate accounts or separate verified domains are tidier, because a problem on one site will not affect the others.

Do I still need SMTP if my host says mail works?

It is still worth doing. Mail sent through the server may work today and then start landing in spam after a change at the host or at the big inbox providers. Sending through an authenticated service on your own domain gives you a log, a clear sender and records you control.

Ports, app passwords and DNS records are fiddly the first time through. Our WordPress support service can set up SMTP with your provider and go through the DNS records and test emails with you.

Next in this series: Contact Form 7 vs WPForms: Which Suits Your Business?

Is Your Website Working Properly?

Get a free website health check from WebMaintor. We'll review your website's speed, security, forms, and technical health — and tell you exactly what needs attention.

No obligation. No automated reports. A real review by our team.