A "relay access denied" error means the mail server refused to send your message because it could not confirm you were allowed to send mail through it. This usually happens when a mail client or website contact form tries to send email without properly authenticating first, or when it's sending through the wrong server. The fix almost always comes down to correcting your outgoing (SMTP) mail settings.
Why this happens
Your mail server only relays outgoing messages for senders it can verify, either because they're logging in as an authenticated email account or because they're sending from a trusted IP address. "Relay access denied" means neither check passed. The most common causes are:
- SMTP authentication is turned off or missing in your mail client's outgoing server settings.
- You're sending "as" one email address but logged in with a different one.
- Your website's contact form or script is trying to send mail without a valid login, or is pointed at the wrong mail server.
- You're trying to send through a mail server that isn't the one your domain's email actually uses.
How to fix it in an email client (Outlook, Thunderbird, phone mail apps)
- Open your account's server settings (usually under Account Settings or Server Settings).
- Find the Outgoing Mail Server (SMTP) section.
- Make sure My outgoing server requires authentication (or an equivalent toggle) is turned on.
- Set it to use the same username and password as your incoming mail account, not a different one.
- Confirm the outgoing server address matches your domain's actual mail server (commonly mail.yourdomain.com), not a leftover setting from a previous email provider.
- Check the port number. 587 with STARTTLS, or 465 with SSL, are the standard secure SMTP ports. Avoid plain, unencrypted port 25 for sending from a client.
- Save the settings and send a test email.
If you recently changed your email password, remember to update it in every device and mail client you use. A client still logging in with the old password will often fail with a relay or authentication error instead of a clear "wrong password" message.
How to fix it on a website contact form or script
If the error is coming from your website rather than a mail client, the script sending the message (a contact form, a WordPress plugin, custom PHP code) needs to authenticate properly too.
- Check that the form or plugin is configured to send through SMTP with authentication rather than PHP's basic unauthenticated mail function, which many mail servers reject outright for security reasons.
- Enter a real mailbox on your domain as the SMTP username and its correct password.
- Set the SMTP host to your domain's mail server and use port 587 or 465.
- Make sure the "From" address used by the form matches, or is closely related to, the authenticated mailbox. Sending "from" an address that has nothing to do with your domain or login is a common trigger for relay errors.
On WordPress, an SMTP plugin that lets you enter these mailbox credentials directly is usually the simplest way to resolve this, since it replaces the unauthenticated default mail function with a properly authenticated connection.
Still getting the error?
- Double-check for typos in the email address and password, especially after a recent password change.
- Confirm the mailbox you're authenticating with actually exists and is active, and hasn't hit its storage quota, since a full mailbox can also cause sending failures.
- If you're on a shared network or using a VPN, some networks block outgoing mail ports entirely. Try switching networks to confirm whether that's the cause.
If you've confirmed your settings are correct and the error continues, open a support ticket so the mail server logs can be checked for the exact reason the connection was refused.