So, I'm trying to send an smtp email from my website as a confirmation that their order has been place. The site is hosted on godaddy and I have no idea what's going on. I'm getting all kinds of error messages. The current one is:
"System.Net.Mail.SmtpException: Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)"
My code is:
string body = "Your order was placed";
MailMessage objEmail1 = new MailMessage("[email protected]", userEmail, "Confirmation Email", body);
objEmail1.IsBodyHtml = true;
SmtpClient client = new SmtpClient();
client.Host = "relay-hosting.secureserver.net";
client.UseDefaultCredentials = false;
client.Send(objEmail1);
I think the problem lies in the from address not belonging to godaddy or with the client.Host. Ideas?