SMTP Error: Key Not Found

Overview

The ‘Key Not Found’ error usually means that a required configuration key, such as an API key, is missing or incorrectly set in your SMTP plugin. This can prevent emails from being sent successfully through your site.

Causes

Most email service providers (like SendLayer and Brevo) require an API key or authentication token for secure email delivery. If this key is missing or not properly configured, you’ll get an error.

In some cases, users might copy the mask version of their API key. This happens on platforms like Brevo where you won’t be able to view your API key after creating it. If you use the masked API key, you’ll likely encounter this error.

Masked API key Brevo mailer

Also, some API keys have expiration dates. If the key has expired or rotated, and you haven’t updated your SMTP plugin with the new key, the SMTP server will throw a “Key Not Found” error.

Solution

To resolve the ‘Key Not Found’ error, ensure you have your email service provider’s correct, unmasked API key.

If you can’t access the API key you created, we suggest generating a new set of API keys. Once you have the API key, you’ll need to paste it into the API key field for your SMTP plugin.

If you’re using an SMTP plugin like WP Mail SMTP, the option is available on the WP Mail SMTP » Settings page. Once here, locate the API key section and paste the new key you generated.

API key field

Note: To access the setup guide for supported email services in WP Mail SMTP, be sure to check our complete mailers guide.

That’s it! Now you know how to troubleshoot and fix the ‘Key not found’ SMTP error.

Would you like to test your SMTP connection to ensure it works properly? Our guide to sending a test email covers all the steps in detail.