send smtp email through godaddy
Posted
by Danni
on Stack Overflow
See other posts from Stack Overflow
or by Danni
Published on 2010-01-09T08:51:48Z
Indexed on
2010/05/13
6:04 UTC
Read the original article
Hit count: 295
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?
© Stack Overflow or respective owner