i am using Go Dady hiosting
this code is
MailMessage mm = new MailMessage("[email protected]", "[email protected]");
mm.Subject = txtSubject.Text;
mm.Body = "Name: " + txtName.Text + "
Email: " + txtEmail.Text + "
" + txtBody.Text;
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();
NetworkCred.UserName = "[email protected]";
NetworkCred.Password = "password";
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
lblMessage.Text = "Email Sent SucessFully.";
txtSubject.Text = "";
txtName.Text = "";
txtEmail.Text = "";
txtBody.Text = "";
this code is working with localhost but in Go Dady Server giving error as
The remote certificate is invalid according to the validation procedure.
Please help me i am new in asp.net, C#
Thank you
Abhinandan
Rajeesh MenothPosted Jun 2, 2015, 7:17 AM
Neeraj KumarPosted Jun 2, 2015, 4:49 AM
Vithal WadjePosted Feb 17, 2015, 10:44 AM
http://www.c-sharpcorner.com/UploadFile/0c1bb2/sending-emails-with-mutilple-bcc-and-cc-using-Asp-Net-C-Sharp/