Sunday, May 23, 2010

goDaddy hosting, send emails using

I had very hard time in sending emails using on go daddy shared hosting.

I tried many options like ssl, default credentials, smtp, ports etc.

Finally below settings worked:
1) Setting From Email (
2) SmtpClient as
3) Disabling the SSL
4) Settings Credentials with username and password


System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

//set the addresses
mail.From = new System.Net.Mail.MailAddress("","ABC");

//set the content
mail.Subject = "New Enquiry";
mail.IsBodyHtml = true;
mail.Body = "some message";

//set the smtp settings
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("");
smtp.EnableSsl = false;

smtp.Credentials = new System.Net.NetworkCredential("","passwordofthisemail");

//send email

lblMessage.Text = "email sent.";