SMTP Relay Access Denied Error with Contact Form Email Notifications

Hi everyone,

I’m having trouble with my WordPress contact form email system. I set it up so that when someone submits the form, it should send two emails - one confirmation to the person who filled it out and another notification to me with all their details.

But it’s not working properly. I keep getting this error message: “SMTP Error: The following recipients failed: [email protected]: Relay access denied”

The emails just won’t go through at all. Has anyone else run into this problem before? I’m not sure what’s causing the relay access to be blocked. Any suggestions on how to resolve this issue would be really helpful.

Thanks!

This happens when your SMTP server thinks you’re sending emails without proper authentication. I’ve hit this same issue tons of times with WordPress contact forms.

Check your SMTP authentication first. Make sure you’ve got the right username and password in your email plugin. Even if they look correct, try typing them again.

Double-check your SMTP server settings too. Port number matters - use 587 for TLS or 465 for SSL. Most hosting providers block port 25.

Using your host’s SMTP? Contact them to make sure your account has relay permissions. Sometimes they need to whitelist your domain or turn on SMTP access manually.

Better yet, switch to a dedicated email service like Gmail SMTP, SendGrid, or Mailgun. They’re way more reliable and have better deliverability.

This video shows exactly how to fix this error:

Also check if your host blocks outgoing SMTP connections. Some shared hosts do this to stop spam. You might need to use their mail server instead.

classic relay problem. your contact form’s trying to send emails FROM your visitor’s email address instead of your own domain. switch the FROM field to something like [email protected]. servers block external domains from relaying through them - it’s spam protection.

This error usually comes from your server’s mail setup, not just authentication problems. I ran into this moving a client’s WordPress site to a new host. The old provider let anything through, but the new one needed proper SPF records and DKIM. Check your domain’s DNS first. Add an SPF record that lets your hosting server’s IP send emails for your domain. Without it, most mail servers will block you as spam. If you’re on shared hosting, the issue might be that tons of domains share the same IP and your host blocks relay to stop abuse. Contact your hosting provider to see if SMTP relay is even enabled for your account. Also check the FROM address in your contact form. Use an email that actually exists on your domain, not the visitor’s email. Using fake addresses triggers anti-spoofing filters that cause relay denials.

Had this exact issue last month. Turned out my hosting provider’s mail server was blocking relay attempts from my contact form plugin. Fixed it by ditching PHP’s default mail function and switching to authenticated SMTP instead. Grab the WP Mail SMTP plugin and set it up with your host’s SMTP credentials - you’ll find these in your control panel under email settings. If it’s still getting blocked, your server might restrict which domains can relay through it. Hit up your hosting support and ask them to verify your domain’s authorized for SMTP relay. Some hosts force you to use their specific mail servers for outgoing messages. Also check if your contact form plugin is formatting sender headers correctly - screwed up headers will trigger relay denials even when your SMTP settings are spot on.

You may try switching to another SMTP Realy service Provider. I have tried DigitalAka™ and found it useful to configure email DNS service and send emails securely.

Bringing this one back up because someone might still be scratching their head over this. Double-check your SMTP settings: make sure your username and password are correct and that your mail server supports SMTP relay. Sometimes updating your platform can mess with these settings, so it’s worth taking another look. Anyone else had this happen recently? Let’s collaborate to sort this out!