Error codes
Every failed email in the log has an error code. Stacko Mail shows it with the explanation and steps on this page. The same codes appear in:
SendResult::$error_codein thestacko_mail_after_sendaction,- the
error_codefield ofstacko_mail_logged, - the
stacko_mail_error_codekey of theWP_Errordata passed to core’swp_mail_failed, - the
errorcolumn ofwp stacko-mail logs list.
Codes with a :mailer suffix (for example auth_failed:gmail) are not separate codes. They are the tailored explanation shown for that service when the base code occurs. The :gmail and :outlook versions are used for the Other SMTP mailer when the server is Gmail or Microsoft 365.
Codes marked usually temporary are worth retrying later. The backup connection is tried for every failure except invalid_address, no_recipients, attachment_failed and blocked, which are caused by the email itself.
The text below matches what the admin shows. Where it mentions “the message below”, it means the provider’s original error message, which the admin shows under the explanation.
auth_failed
Section titled “auth_failed”The username or password was rejected
Your email server refused to log in with the saved details.
- Check the username — it is usually your full email address.
- Type the password again in Connections (it is easy to paste an extra space).
- If you changed the mailbox password recently, update it here too.
auth_failed:gmail
Section titled “auth_failed:gmail”Gmail rejected the password
Gmail does not accept your normal Google password for SMTP. It needs an App Password.
- Turn on 2-Step Verification for the Google account.
- Go to myaccount.google.com/apppasswords and create an App Password.
- Paste the 16-character App Password into Connections (no spaces) and click Test.
auth_failed:outlook
Section titled “auth_failed:outlook”Microsoft 365 rejected the login
Microsoft blocks basic SMTP sign-in for many mailboxes, even with the right password.
- Ask your Microsoft 365 admin to enable “Authenticated SMTP” for this mailbox.
- If security defaults are on, SMTP sign-in may be blocked for the whole organisation.
- Easier: use an API mailer such as Brevo, SendGrid, Mailgun or Postmark instead.
auth_failed:brevo
Section titled “auth_failed:brevo”Brevo did not accept the API key
The key is wrong, was deleted, or is an SMTP key instead of an API key.
- Create a new API key in Brevo → SMTP & API → API Keys (it starts with “xkeysib-”).
- Paste it into Stacko Mail → Connections and click Test.
- Make sure there are no spaces before or after the key.
auth_failed:sendgrid
Section titled “auth_failed:sendgrid”SendGrid did not accept the API key
The key is wrong, was revoked, or lacks permission to send.
- Create a new API key in SendGrid → Settings → API Keys, with “Mail Send” access (it starts with “SG.”).
- Paste it into Stacko Mail → Connections and click Test.
- Make sure there are no spaces before or after the key.
auth_failed:mailgun
Section titled “auth_failed:mailgun”Mailgun did not accept the API key
The key is wrong, or it belongs to a different region (US vs EU).
- Create a new API key in Mailgun → Sending → Domain settings → Sending API keys.
- Paste it into Stacko Mail → Connections and click Test.
- Make sure there are no spaces before or after the key.
- Check that the Region setting matches your Mailgun account.
auth_failed:postmark
Section titled “auth_failed:postmark”Postmark did not accept the token
The Server API token is wrong. An Account token will not work here.
- Create a new API key in Postmark → Servers → your server → API Tokens.
- Paste it into Stacko Mail → Connections and click Test.
- Make sure there are no spaces before or after the key.
app_password_required
Section titled “app_password_required”An app password is required
Your account has 2-step verification on, so it needs a special app password for SMTP.
- Create an app password in your email account’s security settings (Google: myaccount.google.com/apppasswords).
- Use it as the password in Connections instead of your normal password.
smtp_auth_disabled
Section titled “smtp_auth_disabled”SMTP sign-in is turned off for this mailbox
Microsoft 365 has “Authenticated SMTP” disabled for this mailbox or the whole organisation.
- In the Microsoft 365 admin center: Users → this user → Mail → Manage email apps → tick “Authenticated SMTP”.
- Or switch to an API mailer, which does not need SMTP sign-in.
missing_api_key
Section titled “missing_api_key”No API key entered
This email service needs an API key to send.
- Open Connections, paste the API key from your provider’s dashboard and click Save.
api_key_permissions
Section titled “api_key_permissions”The API key is not allowed to send email
The key exists, but it was created with limited permissions.
- Create a new key with “Mail Send” (full access to sending).
- Replace the old key in Connections.
credentials_unreadable
Section titled “credentials_unreadable”The saved password can no longer be read
The security keys (salts) in wp-config.php changed — often after a migration or a security plugin reset — so Stacko Mail cannot decrypt the saved password.
- Open Connections and enter the password or API key again.
- Tip: define STACKO_MAIL_ENCRYPTION_KEY in wp-config.php so this never happens again.
connect_failed
Section titled “connect_failed”Could not reach the email server (usually temporary, safe to resend later)
The connection was refused. Your web host may block outgoing email ports, or the host/port is wrong.
- Check the SMTP host and port (587 for TLS, 465 for SSL).
- Ask your host whether outgoing SMTP is blocked — DigitalOcean, Google Cloud and many shared hosts block it.
- Switch to an API mailer (Brevo, SendGrid, Mailgun, Postmark): they use normal HTTPS and are never blocked.
port_blocked_or_wrong
Section titled “port_blocked_or_wrong”The port is blocked or wrong
Nothing answered on this port. Hosts often block email ports to stop spam.
- Try TLS on port 587, then SSL on port 465.
- If both fail, your host blocks SMTP. Use an API mailer instead — no ports needed.
host_not_found
Section titled “host_not_found”The email server name does not exist
The SMTP host could not be found in DNS — usually a typo.
- Check the spelling, e.g. smtp.gmail.com (not smtp.gmial.com).
- Enter only the host name — no “https://” and no spaces.
timeout
Section titled “timeout”The email server took too long to answer (usually temporary, safe to resend later)
The connection timed out. The server may be busy, or a firewall silently drops the connection.
- Try again in a few minutes.
- If it keeps happening, your host may be dropping SMTP traffic — use an API mailer instead.
tls_failed
Section titled “tls_failed”The secure connection (TLS/SSL) failed
The encryption setting does not match the port, or the server’s certificate is invalid.
- Use TLS with port 587, or SSL with port 465 — not the other way round.
- If your host uses a self-signed certificate, ask them for the correct host name to use.
ip_not_allowed
Section titled “ip_not_allowed”Brevo blocked this server’s IP address
Your Brevo account only allows API calls from approved IP addresses, and this server is not on the list.
- In Brevo, open Security → Authorised IPs.
- Add the IP shown in the error message, or turn off IP blocking.
wrong_region
Section titled “wrong_region”Wrong Mailgun region
Your Mailgun domain lives in a different region (US or EU) than the one selected.
- Change Region in Connections to match your Mailgun account.
domain_not_found
Section titled “domain_not_found”Mailgun does not know this domain
The sending domain is misspelled, not added in Mailgun, or in the other region.
- Copy the exact domain from Mailgun → Sending → Domains (often mg.yourdomain.com).
- Check the Region setting (US or EU).
provider_unavailable
Section titled “provider_unavailable”The email service is having problems (usually temporary, safe to resend later)
The provider answered with a server error. This is usually temporary and not caused by your settings.
- Check the provider’s status page.
- Add a backup connection so emails keep flowing during outages.
sender_rejected
Section titled “sender_rejected”The “From” address is not allowed
Your email service only sends from addresses or domains you have verified with it.
- Verify the From address or its domain in your email service.
- Or set a verified address in Stacko Mail → Settings → From email, and turn on “Force From email”.
sender_rejected:sendgrid
Section titled “sender_rejected:sendgrid”SendGrid has not verified this sender
SendGrid only sends from a verified Single Sender or an authenticated domain.
- In SendGrid, open Settings → Sender Authentication and verify the domain (best) or the single sender.
- Then make sure the From email in Stacko Mail → Settings matches it.
sender_rejected:brevo
Section titled “sender_rejected:brevo”Brevo has not validated this sender
Brevo only sends from senders you added and validated.
- In Brevo, open Senders, Domains & Dedicated IPs → Senders and add this address.
- Authenticate the domain too, for better delivery.
sender_rejected:postmark
Section titled “sender_rejected:postmark”Postmark has no Sender Signature for this address
Postmark only sends from confirmed sender signatures or verified domains.
- In Postmark, open Sender Signatures and add or confirm the From address or domain.
recipient_rejected
Section titled “recipient_rejected”The recipient’s mailbox does not exist
The receiving server said this address is unknown. The email cannot be delivered.
- Check the address for typos. Nothing is wrong with your email settings.
recipient_suppressed
Section titled “recipient_suppressed”The recipient is on the provider’s block list
This address bounced or marked an earlier email as spam, so the provider will not send to it.
- Remove it from the suppression list in your provider’s dashboard if you are sure it is valid.
sandbox_recipient
Section titled “sandbox_recipient”Mailgun sandbox can only send to approved recipients
You are using a Mailgun sandbox domain, which is for testing only.
- Add and verify your own domain in Mailgun and use it here.
invalid_address
Section titled “invalid_address”An email address is invalid
One of the To, Cc, Bcc or From addresses is not a valid email address.
- Check the plugin or form that sent this email for a mistyped address.
no_recipients
Section titled “no_recipients”The email had no recipient
The plugin that sent it did not include a To address.
- Check the notification settings of the plugin shown under “Sent by”.
rate_limited
Section titled “rate_limited”Sending limit reached (usually temporary, safe to resend later)
Your email service is limiting how many emails you can send right now.
- Wait a little and try again.
- Check your plan’s hourly or daily limit with the provider.
quota_exceeded
Section titled “quota_exceeded”Your plan’s email quota is used up
The provider stopped sending because you reached your plan limit.
- Upgrade the plan, wait for the next period, or add a backup connection.
account_restricted
Section titled “account_restricted”Your email service account is restricted
The account is pending approval, suspended or not yet activated.
- Log in to the provider’s dashboard and follow their instructions, or contact their support.
message_too_large
Section titled “message_too_large”The email is too large
The message with its attachments is bigger than the server accepts.
- Send smaller attachments, or a link to the file instead.
attachment_failed
Section titled “attachment_failed”An attachment could not be added
The file does not exist anymore or cannot be read by WordPress.
- Check the plugin that sent this email: the attached file may have been deleted before sending.
invalid_request
Section titled “invalid_request”The email service rejected the request
Something in the email or settings was not accepted. The provider’s message below has the details.
- Read the provider’s message below. If it mentions a field, check that setting in Connections.
php_mail_failed
Section titled “php_mail_failed”The server could not send the email
WordPress tried to use the server’s PHP mail() function and it failed. Many hosts disable or limit it.
- Connect a real email service in Connections — it is free with Brevo and takes two minutes.
blocked
Section titled “blocked”Sending is paused
Email control is set to pause all emails, so this one was not sent on purpose.
- Turn off “Pause all emails” in Settings when you are ready to send again.
unknown_mailer
Section titled “unknown_mailer”The email service is not available
The connection uses a mailer that no longer exists (an add-on may have been removed).
- Open Connections and choose an email service again.
no_connection
Section titled “no_connection”No connection is set up
Stacko Mail has nowhere to send this email.
- Open Connections and set up an email service.
mailer_exception
Section titled “mailer_exception”An unexpected error happened while sending
The mailer stopped with an error. The technical message below has the details.
- Try sending a test email from Tools.
- If it keeps happening, copy the details and contact support.
smtp_error
Section titled “smtp_error”The email server returned an error
The server refused the email. Its exact reply is shown below.
- Open the Timeline tab to see the full server conversation.
unknown
Section titled “unknown”The email could not be sent
Something went wrong. The technical message below has the details.
- Send a test email from Tools to see each step of the connection.