(Solved) Failure sending mail in Godaddy Server I know that this is an old thread. At the same time, I worked on this problem for two weeks. I wish that I had the final answer a couple of weeks ago! If you have shared hosting at GoDaddy.com, you need to use these credentials WHILE your are developing your application: In the namespaces you have to add using System.Net.Mail; or if you are not using any .cs file the you can insert namespace as <% @ Import Namespace ="System.Net.Mail" %> //for mail(from,to,subject,message) MailMessage msg = new MailMessage("frommailid@yourdomain.com", " tomailid@yourdomain.com ", "hello" , "your message"); SmtpClient smtp = new SmtpClient (); smtp . Host = "smtpout.secureserver.net" ; // Only works locally (development time) smtp . EnableSsl = false ; smtp . UseDefaultCredentials = false ; smtp . Credentials = new System . Net . NetworkCredential ( "...
Comments
Post a Comment