Error: API key expired (Elastic Email)
The Elastic Email API key saved in CRM-NG SMTP has passed its expiry date. Create a new key and replace the old one.
Shown by the Elastic Email mailer
The test result or the error log shows a message such as API key expired when CRM-NG SMTP sends through Elastic Email.
This article is for site owners using the Elastic Email mailer whose sending stopped suddenly, often after working for weeks or months.
What this error means
When you create an API key in Elastic Email you can give it an expiry date. Once that date passes, the key stops working, even though it still looks correct in CRM-NG SMTP. Elastic Email recognises the key, sees that it has expired and refuses the request.
This is different from an invalid key: the key was right, but its lifetime is over. All mail from the site stops at the same moment, which is why this error often shows up as "everything worked yesterday".
Common causes
- The key was created with an expiry date, perhaps a default one offered by the form, and that date has arrived.
- Someone in your team set a short lifetime for security reasons and nobody renewed it.
- The site was copied from another site and still uses an old key that has since expired.
How to fix
- Sign in to Elastic Email
Open
https://app.elasticemail.com/with the account that sends for this site. - Open the API key list
Go to Settings and choose Manage API Keys (the page name may vary slightly). Find the expired key; its expiry date is shown in the list or in its details.
- Create a new key
Choose to create a key. Name it after the site. Give it permission to send email; a custom permission set limited to sending is enough. Set no expiry, or a date you will put in your calendar.
- Keep any IP restriction correct
If you limit the key to certain IP addresses, enter your web server's outbound IP address. Ask your host if you do not know it.
- Copy the key
Elastic Email shows the full key only once. Copy it without spaces.
- Replace the key in CRM-NG SMTP
Go to CRM-NG SMTP → Settings → General, confirm Mailer is Elastic Email, press Remove API Key, paste the new key into API Key and save.
- Send a test
Go to CRM-NG SMTP → Tools → Email Test, fill 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 email arrives. Check CRM-NG SMTP → Settings → Email Log: new messages show as sent rather than failed.
Notes
- Emails that failed while the key was expired are not sent again by themselves. If you keep the Email Log with bodies stored, you can open a failed entry and use Resend email.
- Set up email alerts or a webhook so you hear about the next failure straight away. Because alert emails also go through WordPress mail, a webhook is the safer choice when the main mailer is the thing that broke.
- Delete the expired key in Elastic Email to keep the list tidy.
- If the field cannot be edited, the key is fixed in
wp-config.php. See secure settings with constants.
