Mail is not deliverd to Destination
-
Regarding Problem in sending Mail. There is no Error but mail is not delivered to destination My mail server is also working and their Credential is also Correct. Plz help
-
Regarding Problem in sending Mail. There is no Error but mail is not delivered to destination My mail server is also working and their Credential is also Correct. Plz help
Hi, comment out this line smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.UseDefaultCredentials =false; smtp.Credentials = SmtpUser; and test it. Other wise use this code MailAddress SendFrom = new MailAddress(txtFrom.Text); MailAddress SendTo = new MailAddress(txtTo.Text); MailMessage MyMessage = new MailMessage(SendFrom, SendTo); MyMessage.Subject = "Subject here"; MyMessage.IsBodyHtml = true; MyMessage.Priority = MailPriority.Normal; MyMessage.Body = "Some Html Body here"; SmtpClient emailClient = new SmtpClient(); //emailClient.UseDefaultCredentials = true; //emailClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; emailClient.Host = "localhost"; emailClient.Send(MyMessage); It will work. ~JJ
My Blogs... .Net Interview Questions
View 1000's of TV Channels free
My Pages -
Regarding Problem in sending Mail. There is no Error but mail is not delivered to destination My mail server is also working and their Credential is also Correct. Plz help