Your site reached its mail server, named the sender and the recipients, and then the server refused the email itself and did not pass it on. That is what “SMTP Error: Data not accepted” means.
The error line does not say why the server refused. We made a test server refuse the message nine different ways, and WordPress recorded the same 30 characters every time. The server did give a reason each time. WordPress dropped it, but it shows in one line of the SMTP debug transcript, and most of this page is about getting that line and reading it.
The error as WordPress records it
When wp_mail() fails, WordPress passes the error to the wp_mail_failed action, and that is what an email log or a monitoring plugin shows you:
SMTP Error: Data not accepted.
WordPress spells it with a capital D, from its own translatable copy of the message. PHPMailer, the mail library WordPress bundles, uses a lower-case d (SMTP Error: data not accepted.), which you will see where PHPMailer runs outside WordPress or where a plugin reports PHPMailer’s own text. It is the same error.
Nothing else comes with it. The failure data WordPress attaches holds the recipient, the subject, the headers, any attachments and an internal exception code, but not the server’s reply.
What failed, and at which stage
An SMTP send happens in stages: connect, greet, set up encryption if the connection uses it, log in if your site is set up to, name the sender (MAIL FROM), name each recipient (RCPT TO), then send the message (DATA). This error comes from the last stage. Everything before it worked:
- The connection, and any encryption your settings use, worked. A connection problem gives Could not connect to SMTP host instead.
- If your site logs in to the mail server, the login worked. A rejected login gives Could not authenticate.
- The server accepted the sender and the recipients, at least at first.
The server then refused at one of two moments: as soon as WordPress said DATA and asked to send the message, or after the whole message had gone across. PHPMailer ends the session and does not retry. That message was not sent, and it stays unsent unless the plugin or mail queue behind it tries again on its own.
What public reports show
We read 7 public reports of this error on WordPress.org support, from 2023 to November 2026. Six showed a server reply: two refused the sender address (550 Envelope domain gmail.com is not local, 550 5.7.1 Non-Compliant sender address), two were content filters (550 5.7.1 Mail contain spam content), one refused the sending server’s IP address (550 5.2.0 ip address is not allowed), and one rejected a malformed message (554 Transaction failed: Missing start boundary). The seventh showed no server reply at all.
None of the seven ends with the reporter confirming what fixed it. Seven reports are too few to rank causes, and we do not. In six of the seven, though, the server’s own reason was in the thread, and the people answering worked from it.
How to tell which cause you have
WordPress’s error, and any log that records wp_mail_failed, hold only the generic line. The server’s reply is visible in the debug transcript, the line-by-line record of what WordPress and the mail server said to each other (the guide to reading an SMTP session log walks through one). Your mail provider may also have it in its sending logs.
Capture the transcript while you repeat the send that failed: the same form, the same order email, the same attachment. A plugin’s “send test email” button may use a different message, recipient or From setting from the send that failed, so it can succeed while the real send still fails. Use it to capture the transcript only if it fails the same way. If your SMTP plugin can log the transcript for every send, turn that on. Plugins name the setting differently, so check the plugin’s documentation. Without a plugin, a short snippet does the same. Add it as a
must-use plugin (a PHP file in wp-content/mu-plugins/), repeat the send that failed, read your PHP error log, and remove the file:
<?php
add_action( 'phpmailer_init', function ( $phpmailer ) {
$phpmailer->SMTPDebug = 3; // the level we tested with
$phpmailer->Debugoutput = 'error_log'; // write to the PHP error log
}, 99 );
Use debug level 2 or higher so the transcript includes the server’s replies; we used 3. An SMTP plugin that sets its own debug level may override the snippet; its own log is the better source then. Below level 4, PHPMailer replaces the username and password with [credentials hidden], but the transcript still names your mail server and the addresses and includes the whole message, so whatever a visitor typed into a form ends up in your error log. Do not paste it publicly unedited. When you are done, remove the snippet and delete those lines from the log.
In the transcript, look for a line that starts SMTP ERROR:. Here is one from our tests, where the server refused after the body, using the reply text Amazon SES documents for an unverified sender. The address and region are the ones our test setup filled in; yours will show your own:
CLIENT -> SERVER: .
SERVER -> CLIENT: 554 Message rejected: Email address is not verified. The following identities failed the check in region us-east-1: [email protected]
SMTP ERROR: DATA END command failed: 554 Message rejected: Email address is not verified. The following identities failed the check in region us-east-1: [email protected]
SMTP Error: Data not accepted.
Everything after command failed: is the server’s reason. The words before it tell you the moment:
DATA command failedmeans the server refused as soon as WordPress asked to send, before it saw the message.DATA END command failedmeans the server read the whole message, then refused it.
A refusal at DATA came before the server saw a word of the message, so the message’s content and size are unlikely to be the reason; the account or the envelope is the better suspect. We have not tested that: neither Google’s nor Amazon’s documentation says at which moment its replies arrive, so we replayed each at both, and WordPress recorded the same error either way. Go by the reply text first.
Match the reply against this table. The first six rows are replies we replayed in our tests; the rest are from the public reports.
Reply after command failed: |
Cause | Where to fix it |
|---|---|---|
554 Message rejected: Email address is not verified. The following identities failed the check in region ... (Amazon SES) |
An identity the service has not verified: the From, Source, Sender or Return-Path address, or, in an account still in the SES sandbox, a recipient | The sending service’s dashboard, for the addresses and region the reply lists |
552 5.3.4 Your message exceeded Google's message size limits. |
Message too large | The attachment or the message |
552 Message is too long. (Amazon SES) |
Message too large | The attachment or the message |
550 5.7.1 This message is likely unsolicited email... (Google) |
Content filter | The message content |
552 5.7.0 This message was blocked because its content presents a potential security issue. (Google) |
Google reports a potential security issue in the content | Google’s content and attachment guidelines |
554 Transaction failed with nothing after it |
The server gave no reason | Your provider, with the time of the send |
Envelope domain ... is not local, Non-Compliant sender address |
The server will not send for that From address | The From address in your mailer settings |
Mail contain spam content |
Content filter | The message content |
ip address is not allowed |
The service does not accept mail from your server’s IP | The service’s administrator or provider |
Missing start boundary |
The message itself is malformed | The plugin or code that built the message |
Your provider’s wording will differ, so read these words as clues and check its documentation for the exact reply: “verified”, “sender”, “not local” or “not allowed to send as” point at an address the service will not accept (the sender, or on SES in the sandbox a recipient); “ip” with “not allowed” at an allow list; “size”, “too long” or “exceeded” at size; “spam”, “unsolicited”, “content” or “security” at a filter. If the reply names no cause, ask the provider.
Both Google content-filter texts come from Google’s table of replies to mail sent to Gmail. We used them to show how WordPress handles a reply of that shape, not to suggest your SMTP relay sends exactly those words.
The fix for each cause
Our tests showed only that once the server accepts the message, WordPress sends it. We did not test which change gets a particular provider to accept it; the fixes below come from the providers’ documentation and the replies themselves.
The service will not accept an address
Use a sender address your mail service permits; the service’s documentation says which addresses or domains those are. Set it in your mailer plugin’s From setting. If the plugin can force that From address, turning it on stops a form or another plugin from replacing it. If a contact form puts the visitor’s address in the From field, a common setup is to send from your own address and put the visitor’s address in Reply-To.
Amazon SES
refuses mail from a From, Source, Sender or Return-Path address that is not a verified identity, and its reply lists the addresses that failed and the region. Verify those addresses in that region. While an SES account is still in the sandbox, every recipient has to be verified as well, so the address in the reply may be the person you were sending to.
The message is too large
Send the same message once without its attachment. If that goes through, link to the file instead of attaching it, or make it smaller. Providers set their own limits:
Google and
Amazon SES both refuse oversized messages with the replies in the table.
A content filter refused it
Send a plain test message from the same site. If it succeeds, compare its sender, recipients, headers, attachments and body with the message that failed; the difference may point at what the filter refused. Ask the provider what its filter flagged. Separately, check that your sending domain has SPF and DKIM set up for the service, though that alone will not undo a content refusal.
The server’s IP is not allowed
Some services accept mail only from listed IP addresses. If yours does, ask its administrator or provider to allow the IP your site actually sends from; your host can tell you which that is.
No reason given
A bare 554 Transaction failed is the SMTP standard’s generic refusal (
RFC 5321, section 4.2.3). Ask your provider whether it can find the refusal in its logs, and give it the exact time of the failed send and the From and To addresses.
Check that it stays fixed
Send the same message that failed, from the same form and with the same attachment, not just a short test. A short test message can pass while the real one is still refused for its size or content. Then confirm it arrived; the delivery check guide covers that part.
nanoPost makes Email Check, a free plugin that sends its own short test email through wp_mail(), daily or twice a day, to an address you choose, and keeps the result and the error text. A refusal that would also hit that test message shows up there; one tied to a particular form’s attachment or content does not. In our tests it recorded the same generic line as WordPress, not the server’s reply, so keep the debug step above for the reason. If you would rather not add a plugin, the wp_mail_failed hook guide shows how to log failures yourself.
How we tested
On 21 November 2026 we ran WordPress 7.1.5 with its bundled PHPMailer 7.1.1, on PHP 8.3.6 with OpenSSL 3.0.13, sending through a test SMTP server we control, configured through the phpmailer_init hook. The server accepted the login, the sender and the recipient, then refused the message with reply texts copied from Google’s and Amazon SES’s documentation and from RFC 5321, once at DATA and once after the body. Email Check 0.9.0 recorded the error that wp_mail_failed received, and we kept PHPMailer’s transcript at debug level 3. With the server accepting the message, the same setup sent successfully.
The limits: no message went to Google or Amazon, so the replies are their documented text, not live captures; one PHP version; core WordPress with no SMTP plugin in the path. The public reports come from a search of WordPress.org support made the same day.
For the other reply codes an SMTP server can send, the SMTP field manual is the reference, and the WordPress email troubleshooting guide sorts every error by the stage it comes from.
