TECH / Servers & Websites 3 min read

WordPress Not Sending Emails: Why It Happens and How to Fix It

Antonio NEMCD Author
Published Nov 13, 2016 · 3 min

I once noticed that my WordPress blog had completely stopped sending emails – no comment moderation alerts, no password reset links, nothing. Worse yet, WordPress showed zero warnings in the dashboard, leaving everything looking completely normal on the surface.

WordPress admin interface

Checking the web server error logs exposed the problem immediately – and it’s still one of the most common WordPress headaches today.

Why Default WordPress Email Silently Fails

Right inside the Apache/PHP error log sat a PHPMailer exception:

PHP Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: [email protected]'

Out of the box, WordPress tries to send mail via PHP’s mail() function using a made-up [email protected] sender address. Today that breaks for one of three reasons:

  • Non-existent sender mailbox: hosting relays and major providers (Gmail, Outlook, iCloud) routinely reject mail claiming to come from an address that doesn’t exist.
  • Missing SPF, DKIM, and DMARC: even when PHP mail() succeeds locally, unauthenticated messages get quietly dropped or routed straight into Spam.
  • Blocked port 25 or no local MTA: many VPS providers block outbound port 25 by default or ship without sendmail/Postfix configured.

The Reliable Fix: Switch WordPress to Authenticated SMTP

Never patch core files inside wp-includes/ – the very next WordPress update will overwrite your changes. The clean, permanent fix is routing outgoing mail through authenticated SMTP (or a transactional email API):

  1. Use a real sender address on your domain: create a mailbox like [email protected], or connect a transactional mail service (Postmark, Brevo, Amazon SES, Resend, Mailgun – several offer generous free tiers).
  2. Install a maintained SMTP plugin: free, actively supported plugins like FluentSMTP or WP Mail SMTP work cleanly with modern PHP 8 and WordPress (years ago an old 2007 plugin called XPertMailer rescued my blog, but legacy plugins from that era shouldn’t be run on modern WordPress).
  3. Enter your SMTP credentials: server host, port (587 for STARTTLS or 465 for SSL/TLS), username, and password (if using Gmail or Google Workspace, generate a dedicated App Password – standard Google account passwords no longer work over SMTP).
  4. Verify DNS authentication: publish proper SPF, DKIM, and DMARC DNS records for your domain, then fire a test email straight from the plugin settings.

Troubleshooting SSL Socket and Encoding Errors

If your SMTP test throws SMTP: Failed to connect socket: Unable to find the socket transport "ssl", PHP’s OpenSSL extension isn’t enabled (uncomment extension=openssl in php.ini or ask your host). And if non-Latin characters ever arrive garbled in custom scripts, make sure the message charset is explicitly set to UTF-8.

Archival example of WordPress SMTP configuration settings

Once WordPress sends through authenticated SMTP with valid SPF and DKIM records, comment notifications, contact forms, and password resets start landing in the inbox reliably within seconds.

Related posts:

Leave a Comment