WordPress is not sending email
How to connect WordPress to a real mail server with SMTP, so messages get delivered.
- You need
- Hosting panel
- Updated
WordPress sends email straight from the web server with PHP's mail() function, by default from wordpress@yourdomain.com. Many hosting providers limit or block this kind of sending. Unless your hosting provider has set it up, the web server is also not listed in the domain's SPF record, and the messages aren't signed with DKIM. The receiving mail server then rejects them or files them as spam.
The fix is to send over SMTP through a real email account or a transactional email service.
Test whether WordPress can send email
- Open the login page in a private window and click "Lost your password?".
- Enter your username and click "Get New Password".
- If you see "The email could not be sent. Your site may not be correctly configured to send emails.", the server can't send email at all.
- If WordPress says the email was sent but it never arrives, check your spam folder. If it isn't there either, the server never passed it on, or the receiving server rejected it.
Either way, SMTP is the fix. Also check that the address under Settings → General → Administration Email Address is correct.
Get the SMTP details
You need the same details an email client uses for outgoing mail. Your email provider gives you these:
- SMTP server, for example
smtp.example.com - port and encryption, either 587 with TLS or 465 with SSL
- username, either the full email address or a separate username from the provider
- password, or an app password if the account uses two-step verification
Use an address on your own domain, such as hello@yourdomain.com. Ideally create a separate account for the website, so you don't have to use the password of a personal account.
From the end of December 2026, Microsoft turns off SMTP sign-in with a username and password in Microsoft 365 by default. If you use Microsoft 365, connect with OAuth instead. In WP Mail SMTP that requires a Pro licence. For Google Workspace and Gmail, the free version of WP Mail SMTP has its own OAuth connection.
If the site sends a lot of email, such as WooCommerce order confirmations, a transactional email service like Postmark, Mailgun or Brevo is a better choice than an ordinary mailbox. Ordinary mailboxes have a daily sending limit.
Set up WP Mail SMTP
WP Mail SMTP is a free plugin that sends all email from WordPress over SMTP or through an email service's API.
- Go to Plugins → Add Plugin, search for "WP Mail SMTP", click "Install Now" and then "Activate".
- Go to WP Mail SMTP → Settings and open the General tab.
- Enter the address on your own domain in From Email, and tick Force From Email. All plugins then use the same sender address.
- Choose Other SMTP as the Mailer, and fill in SMTP Host, Encryption, SMTP Port, SMTP Username and SMTP Password.
- Save the settings.
If your email provider or email service has its own option in the Mailer list, choose that instead.
Send a test message
Go to WP Mail SMTP → Tools and open the Email Test tab. Enter an address you have access to, and click "Send Email".
If the message arrives, sending works. If the plugin says the message was sent but it doesn't arrive, check your spam folder.
When you're stuck
If the plugin shows an error, first check the password, and that the port and encryption match. If that doesn't help, either your email provider is rejecting the login, or your hosting provider is blocking the port for outgoing email. The email provider can see whether the login was rejected, and the hosting provider can tell you whether the port is open. Include the error message from WP Mail SMTP when you contact them.
If the email arrives but lands in spam, the domain needs SPF, DKIM and DMARC, which requires access to the domain's DNS. mail-tester.com gives you an address to send the test message to, and scores the SPF, DKIM and content of the message.