WordPress not sending email: fix WP Mail SMTP "test email failed"
Why WordPress (WooCommerce orders, Contact Form 7, password resets) stops sending: PHP mail() disabled or unauthenticated, port 25 blocked, wrong SMTP host/port/encryption, app-password rules, hourly caps, From-domain DMARC failures, and plugin conflicts. Each with the fix and the error text you will see.
What WordPress means: wp_mail() returned false or the SMTP plugin's test failed. WordPress itself never "loses" mail — the handoff to the mail transport failed, and the error text in the plugin log says where.
Causes, most likely first — and the fix for each
- No SMTP configured: PHP mail() hands mail to the host's local mailer, which is disabled or unauthenticated on most shared hosting; messages vanish or land in spam.
Fix: Configure SMTP (WP Mail SMTP → Other SMTP, or the QueenSMTP plugin) with a real host on 587/465 and authentication. - "Connection refused" / "Connection timed out": the host blocks outbound SMTP or the port is wrong.
Fix: Try 587, 465, then 2525; if all fail, the host blocks them — ask, or use an API-based mailer. - "535 Authentication failed": account password used where an app password/SMTP credential is required (Gmail, Yahoo, Office 365, relays).
Fix: See the 535 page — create the app password or SMTP credential. - Wrong encryption for the port ("SSL" on 587 or "TLS" on 465) — PHPMailer reports "SMTP connect() failed" or "Could not connect to SMTP host".
Fix: 587 = TLS, 465 = SSL. - Hourly cap on the host (cPanel "exceeded the max emails per hour") after a WooCommerce sale burst.
Fix: Relay externally; caps do not apply to an external relay. - From address on a domain you do not control (From: customer@gmail.com in a contact form) → DMARC failure at the receiver, silently spam or rejected.
Fix: Force the From to your own verified domain and put the visitor in Reply-To (WP Mail SMTP: "Force From Email"). - Another plugin also overrides phpmailer_init or wp_mail (two SMTP plugins, a security plugin blocking outbound).
Fix: Deactivate duplicates; keep one SMTP plugin.
How to confirm which one you have
WP Mail SMTP → Tools → Email Test shows the exact SMTP reply; paste the code (535/550/554/timeout) into the matching page here.
Open the SMTP tester Check SPF / DKIM / DMARC
Still stuck? Use a relay that tells you why
QueenSMTP shows every message's exact server reply in the log, verifies your domain's SPF and DKIM before you send, and is not subject to mailbox-provider caps. $5/year plus $0.10 per 1,000 emails; 100 a day free to test.
Try it freeRelated errors
Questions about WordPress
Usually a From/DMARC problem (order mails use a different From than the test) or a caching/queue plugin holding the action. Check the plugin log for each order email.
No. The free WP Mail SMTP "Other SMTP" option, the free QueenSMTP plugin, or a 15-line mu-plugin all work with any SMTP provider.
Related Guides
Continue learning with these related articles