Cannot send email in ASP.NET through Godaddy servers.
Posted
by
Jared
on Stack Overflow
See other posts from Stack Overflow
or by Jared
Published on 2009-09-01T02:02:51Z
Indexed on
2011/01/04
13:54 UTC
Read the original article
Hit count: 298
I have an ASP.NET application hosted on Godaddy that I want to send email from. When it runs, I get: Mailbox name not allowed. The server response was: sorry, relaying denied from your location. The important parts of the code and Web.config are below:
msg = new MailMessage("[email protected]", email);
msg.Subject = "GreekTools Registration";
msg.Body =
"You have been invited by your organization to register for the GreekTools recruitment application.<br/><br/>" +
url + "<br/><br/>" +
"Sincerely,<br/>" +
"The GreekTools Team";
msg.IsBodyHtml = true;
client = new SmtpClient();
client.Host = "relay-hosting.secureserver.net";
client.Send(msg);
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network host="relay-hosting.secureserver.net" port="25" userName="********" password="*********" />
</smtp>
</mailSettings>
© Stack Overflow or respective owner