WordPress Not Sending Emails? How to Fix It with SMTP

12 min read

Share
An envelope stuck between a website window and an inbox, with a broken path between them

When WordPress emails stop arriving, it is usually one of two situations:

  1. No SMTP is set up at all. WordPress sends mail with PHP's mail() function from your hosting server. Many hosts limit or block it, and mail that does go out often lands in spam or is rejected, because it is not sent from a real, authenticated mailbox.
  2. SMTP is set up, but it broke. A password was changed, a Google or Microsoft connection expired, the wrong port or encryption is used, or the hosting blocks the port.

In both cases the fix is the same idea: send through a real email account with SMTP (or an email API like Gmail or Microsoft Graph), using the correct settings. This guide shows how to find which situation you are in and how to fix it, starting with the email account that already comes with your cPanel hosting.

Quick checklist: WordPress emails not sending

  1. Send a test email to see whether anything goes out (Step 1).
  2. No SMTP plugin? Install one, such as WP Mail SMTP (Step 2).
  3. Create a mailbox in cPanel and copy its SMTP settings from Connect Devices (Step 3).
  4. Use SSL on port 465; if that fails, try TLS on port 587 (Step 3).
  5. Read the error message and match it in the table (Step 4).
  6. Check the recipient addresses: no typos, not deleted, not full (Step 4).
  7. Using Gmail or Microsoft 365? Use their own setup, and expect to re-authorize after a password change (Step 5).
  8. Add SPF and DKIM so mail does not land in spam (Step 6).

Which emails are we talking about?

WordPress sends many emails you rarely think about until they are missing:

  • contact form notifications (Contact Form 7, WPForms, Elementor forms);
  • password reset and new user emails;
  • WooCommerce order emails to you and to customers;
  • admin notices, like plugin update and recovery mode emails.

If only one of these is missing, check that plugin's settings first (the "To" address, a typo, a disabled notification). If all of them are missing, it is the sending itself, and the steps below apply.

Step 1: Test whether WordPress can send at all

Install WP Mail SMTP (free) and open WP Mail SMTP > Tools > Email Test. Enter an address you can check, such as a personal Gmail, and click Send Email.

  • The test arrives: sending works. Check the spam folder and the settings of the plugin whose email is missing.
  • The test fails with an error: good, the error tells you what is wrong. Go to Step 4.
  • "Sent" but it never arrives: the server accepted it but the receiving side dropped it or put it in spam. Set up SMTP (Step 3) and SPF/DKIM (Step 6).

Step 2: Use an SMTP plugin

An SMTP plugin replaces WordPress's default sending with a proper login to a mail server. The popular free ones are WP Mail SMTP, FluentSMTP, Easy WP SMTP and Post SMTP. They all work in a similar way; I use WP Mail SMTP, so the steps below follow its screens.

Use only one mail plugin. Two plugins that both take over WordPress mail (for example an SMTP plugin and a Microsoft 365 mail plugin) can fight each other, and you never know which one actually sent the email.

Step 3: Set up SMTP with your cPanel email account

If your website is on cPanel hosting, you usually already have free email accounts on your own domain. This is the simplest and cheapest way to send WordPress emails.

Create a mailbox for the website

In cPanel, open Email Accounts and click Create. Use an address on your domain, such as [email protected] or [email protected], and give it a strong password.

Get the correct SMTP settings from Connect Devices

This is where many people go wrong: they copy SMTP settings from a random tutorial or from another host. Take them from your own mailbox instead.

  1. In Email Accounts, click Connect Devices next to the mailbox.
  2. Look at the box Secure SSL/TLS Settings (Recommended).
  3. Note the Outgoing Server and the SMTP Port (usually 465).
  4. The username is the full email address, and the password is the mailbox password.

Your host may show mail.yourdomain.com here, or the server's own hostname (something like server123.hostingcompany.com). cPanel shows the server hostname when your domain has no valid SSL certificate for mail. Use exactly what this page shows for your mailbox, not what another guide says, because the values differ from host to host and even from server to server.

Fill in WP Mail SMTP

In WP Mail SMTP > Settings:

  • From Email: the mailbox you created, for example [email protected].
  • Tick Force From Email, so every plugin sends from this address.
  • Mailer: Other SMTP.
  • SMTP Host: the Outgoing Server from Connect Devices.
  • Encryption: SSL.
  • SMTP Port: 465.
  • Authentication: on.
  • SMTP Username: the full email address.
  • SMTP Password: the mailbox password.

Save, then send the test email again from Tools > Email Test.

SSL on 465 or TLS on 587?

cPanel mail mainly uses SSL on port 465, and its Connect Devices page recommends it. That is what I set every time, and it works on most cPanel hosts.

If 465 does not connect, try TLS on port 587. Some hosts or networks block one port but allow the other.

Often the problem is not SSL or TLS at all, but the port number typed in the plugin. Each encryption choice works only on its own port:

Encryption in the pluginPortWhat happens
SSL465The connection is encrypted from the first moment. This is what cPanel recommends.
TLS587The connection starts plain and then switches to encryption (called STARTTLS). This is what "TLS" means in WP Mail SMTP and most SMTP plugins.
None25 (or 587)No encryption. Port 25 is blocked on most hosting and home networks; avoid it.

So SSL with 465 and TLS with 587 are the two working pairs. If you choose SSL but leave the port at 587, or TLS with port 465, the plugin connects to the right server in the wrong way, and you get "could not connect", a timeout, or an SSL error, even though the host, username and password are all correct. When an SMTP setup fails, the first thing I check is this pair.

Some email services also offer 2525 as an extra port when 587 is blocked. Use it only if your provider lists it.

Step 4: Match the error message

ErrorWhat it usually meansWhat to try
SMTP Error: Could not connect to SMTP hostWrong port for the encryption, wrong host, or a blocked portCheck the pair (SSL = 465, TLS = 587), check the host name, ask the host whether the port is blocked
SMTP Error: Could not authenticateConnected, but the username or password was rejectedRe-type the password, use the full email as username, check whether the mailbox was locked after failed tries
Connection timed outA firewall or blocked portTry the other port; ask the host to allow outgoing SMTP
Certificate / SSL errorsThe certificate does not match the host nameUse the host name that matches the certificate (often the server hostname)
invalid_grant: Token has been expired or revokedA Gmail connection was revoked, often after a password changeReconnect the Google account (Gmail guide)
AADSTS50173: The provided grant has expiredA Microsoft 365 sign-in was revoked, often after a password or MFA changeAuthorize the mailbox again (Microsoft 365 guide)
550 5.1.1 User unknown / Recipient address rejectedThe "To" address does not exist, is mistyped or was deletedFix the address in the form's notification settings
Mailbox full / quota exceededThe receiving mailbox is over its quotaFree up space or raise the quota in cPanel
Test says sent, nothing arrivesSpam filtering or rejected by the receiverSPF/DKIM (Step 6), and send from your own domain

Many hosts block outgoing SMTP

Some hosting companies block outgoing connections on SMTP ports to stop spam from hacked sites. Then no external SMTP server works (not Gmail, not Microsoft), and only the host's own mail server does. If every setting looks right and you still get "could not connect", ask your host directly: "Are outgoing connections on ports 465 and 587 allowed from my account?"

The password was changed

This is the case I run into most on sites that "used to work". Someone changed the mailbox password in cPanel (or in Gmail or Microsoft 365) and nobody updated WordPress. With Other SMTP, type the new password into WP Mail SMTP. With Gmail or Microsoft 365, changing the password also cancels the plugin's connection, and you must authorize the plugin again. Both are explained in the guides below.

The email address itself is broken

Sometimes nothing is wrong with SMTP at all: the email simply goes to an address that cannot receive mail. Check the addresses before you change any settings:

  • Incomplete or mistyped addresses. info@yourdomain without .com, [email protected], [email protected], a space or a comma inside the address. Look at the notification "To" field in your form plugin (Contact Form 7 Mail tab, WPForms Notifications, Elementor form Actions After Submit > Email) and in Settings > General > Administration Email Address.
  • Deleted or disabled mailboxes. The form still sends to [email protected], but that mailbox was deleted in cPanel, an employee left and their Microsoft 365 account was removed, or a forwarder points to an address that no longer exists. The email is sent, then bounces back, so nobody sees it.
  • Full mailboxes. A mailbox that is over its cPanel quota rejects new mail. Check Email Accounts for accounts at 100% usage.
  • Wrong addresses typed by visitors. In WooCommerce orders or auto-replies, a customer who types [email protected] never gets the email. That is not your server's fault, but repeated bounces to bad addresses can hurt your sending reputation.

How to spot it:

  • The email log or the bounce message shows errors like 550 5.1.1 User unknown, Recipient address rejected, mailbox unavailable or mailbox full.
  • In cPanel, Track Delivery shows each message and whether the receiving server accepted it.
  • The bounce (the "Mail Delivery Failed" email) goes back to the From mailbox, so log into that mailbox and look for it.

Fixes: correct the addresses in the form and WordPress settings, send notifications to a mailbox that exists and is read, and use the form plugin's email field validation (and a confirm-email field on important forms) so visitors cannot submit a half-finished address.

Step 5: Gmail and Microsoft 365 need their own setup

If your email runs on Gmail / Google Workspace or on Microsoft 365 (Outlook), do not just type their SMTP server and your normal password into Other SMTP:

  • Gmail does not accept your normal password over SMTP. Use the plugin's Google / Gmail mailer (OAuth), or an App Password with 2-Step Verification. Both stop working after a password change until you reconnect. Full steps: How to send WordPress emails with Gmail SMTP.
  • Microsoft 365 is retiring password-based SMTP (Basic authentication for SMTP AUTH), with Microsoft's current plan to turn it off by default from December 2026. The reliable way is Microsoft Graph, for example with the free WPO365 | Microsoft 365 Graph Mailer plugin and an app registration in Microsoft Entra (Azure). Full steps: How to send WordPress emails with Microsoft 365.

Step 6: Stop WordPress emails going to spam

Even when sending works, mail can land in spam if your domain does not say who may send for it.

  • Send from your own domain. Use [email protected], not a Gmail address, as the From Email for a business site.
  • SPF: a DNS TXT record listing the servers allowed to send for your domain. cPanel usually creates it; check under Email Deliverability. A domain must have only one SPF record. If you also send through Google or Microsoft, their servers have to be in the same record.
  • DKIM: a signature that proves the mail was not changed. Also in cPanel's Email Deliverability, or set it up in Google or Microsoft if they host your mail.
  • DMARC: a policy record that tells receivers what to do with mail that fails SPF/DKIM. Start with a relaxed policy (p=none) and tighten it later.

If cPanel's Email Deliverability shows a problem and your DNS is managed elsewhere (for example at Cloudflare), copy the suggested records to that DNS provider.

How to keep WordPress emails working

  • Keep a short note of which mailer and mailbox the site uses, so a password change is never a surprise.
  • After any password change on the sending mailbox, update WordPress the same day, and send a test email.
  • Turn on an email log and look at it once in a while.
  • For important forms, also save entries in the database (most form plugins can), so a lead is never lost even if an email fails.
  • For Microsoft 365 setups, put the client secret expiry date in your calendar.

Frequently asked questions

Why does WordPress not send emails without SMTP?

By default WordPress uses the server's PHP mail function. Many hosts limit it, and mail sent that way is not authenticated by a real mailbox, so receivers often reject it or mark it as spam.

Which SMTP port should I use for cPanel email?

Use 465 with SSL, which cPanel recommends. If your host or network blocks it, use 587 with TLS. The encryption and the port must match: SSL with 587, or TLS with 465, does not connect.

What is the difference between SSL and TLS in an SMTP plugin?

In SMTP plugins, SSL means the connection is encrypted from the start (port 465), and TLS means it starts plain and upgrades to encryption with STARTTLS (port 587). Both are secure; what matters is using the right port for the option you pick.

What is the SMTP host for my cPanel email?

Open Email Accounts > Connect Devices next to the mailbox. It shows the outgoing server, usually mail.yourdomain.com or your server's hostname.

Why did my WordPress emails stop after I changed my password?

The plugin still uses the old password, or, with Gmail and Microsoft 365, the connection was cancelled by the password change. Enter the new password, or reconnect / re-authorize the account in the plugin.

The form says "sent" but the email never arrives. Why?

Often the recipient address is wrong: a typo, a missing .com, or a mailbox that was deleted or is full. Check the form's notification "To" field, then look for a bounce message in the sending mailbox or in cPanel's Track Delivery.

Can I use my Gmail address to send WordPress emails?

Yes, with the plugin's Google / Gmail mailer or an App Password. For a business site, an address on your own domain is better for deliverability.

Found this useful? Share it with someone who runs a website.

Share this article