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>