# Error: Unauthenticated (MailerSend)

Source: https://catalystgroup.gg/docs/email-delivery/error-mailersend-unauthenticated/
Updated: 2026-10-19 · By Duane Garner

MailerSend refused the request because the API key CRM-NG SMTP sent is missing, wrong or deleted. Create a fresh key and paste it in.

> **Shown by the MailerSend mailer:** The test result, the failed-send banner or **Tools → Debug Events** shows a message such as `Unauthenticated.` (often with HTTP status 401) after CRM-NG SMTP tries to send through MailerSend.

 

This article is for site owners who use the **MailerSend** mailer and see this message on a test email or in the error log.

 

## What this error means

 

Every request CRM-NG SMTP makes to MailerSend carries your API key. MailerSend checks that key before it looks at anything else in the message. "Unauthenticated" means the check failed: MailerSend could not match the key to an active token on any account, so it rejected the request without trying to send.

 

Nothing is wrong with your message, your recipients or your domain at this point. The problem is only the key.

 

## Common causes

 
- The **API Key** field is empty, or the key was pasted with a missing character, a leading or trailing space, or a line break.
- The token was deleted or regenerated in MailerSend after you saved it in CRM-NG SMTP.
- The key belongs to a different MailerSend account than the one where your domain is set up, and that account has since been closed.
- The key was copied from somewhere other than MailerSend's token screen, for example an SMTP password for the same account.
- The key is set in `wp-config.php` with a `CRMNG_SMTP_*` constant, and the constant still holds an old value.

 

## How to fix

 
1. Sign in to MailerSend
  Open `https://app.mailersend.com/` with the account that owns your sending domain.
2. Open the API tokens page
  Go to **Integrations** and choose **API tokens** (MailerSend also links to it from each domain's settings page). Look for the token you used for this site.
3. Create a new token
  Choose to generate a new token, give it a name such as the site's address, and pick the domain it may send from. Give it at least sending access for email; full access is not needed.
4. Copy the token once
  MailerSend shows the full token only at creation. Copy it straight away, without spaces.
5. Replace the key in CRM-NG SMTP
  Go to **CRM-NG SMTP → Settings → General**. Check that **Mailer** is set to **MailerSend**. If a key is already stored, press **Remove API Key**, then paste the new token into **API Key**.
6. Save
  Save the settings and wait for "Settings were successfully saved."
7. Send a test
  Go to **CRM-NG SMTP → Tools → Email Test**, enter your own address in **Send To** and press **Send Email**.

 

## Verify it worked

 

The test page shows "Test email sent successfully! Check your inbox to confirm delivery." and the message arrives. In MailerSend, the activity page for your domain lists the test email. The failed-send banner disappears after the next successful send.

 

## Notes

 
- If the **API Key** field is greyed out, the key is fixed in `wp-config.php`. Change the constant there instead. See [secure settings with constants](https://catalystgroup.gg/docs/email-delivery/secure-settings-constants/).
- Delete the old token in MailerSend once the new one works, so a leaked copy cannot be used.
- If the error changes to a message about your domain or a trial account, the key is now accepted and you have moved on to the next step. See the related articles below.

 

## Related

 
- [MailerSend mailer guide](https://catalystgroup.gg/docs/email-delivery/mailer-mailersend/)
- [Error: Domain not verified (MailerSend)](https://catalystgroup.gg/docs/email-delivery/error-mailersend-domain-not-verified/)
- [Error: Trial accounts can only send to the admin address (MailerSend)](https://catalystgroup.gg/docs/email-delivery/error-mailersend-trial-accounts/)
- [Sharing credentials safely](https://catalystgroup.gg/docs/email-delivery/sharing-credentials-safely/)
- [Troubleshooting email delivery](https://catalystgroup.gg/docs/email-delivery/troubleshooting/)
