Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
I am getting "Mailbox unavailable. The server response was: 5.4.1 Unable to relay for myemail@mydomain.com" when I try to send the mail using C# code.

Then I tested my smtp server https://www.wormly.com/test_smtp_server".

Here when I enter my smtp server, sender and recipient name. I got followoing message:

MAIL FROM: mymail@mydomain.com

SMTP -> FROM SERVER:

250 2.1.0 Sender OK

RCPT TO: anothermail@mydomain.com

SMTP -> FROM SERVER:

550 5.4.1 Relay Access Denied

SMTP -> ERROR: RCPT not accepted from server: 550 5.4.1 Relay Access Denied

Message sending failed.
Posted

1 solution

Your SMTP server should be configured to be authoritative for one domain (i.e. mydomain.com). Better choose a mail domain name that is more representative (mydomain.com seems way too much generic).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900