Posted on: 10/6/2014 1:38:54 PM | Views : 536

Hi All,
I am trying to send email from my website.
But i am getting below error.
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. xc1sm11528563pac.8 - gsmtp My code is like below .
public void SendMail(string str1) { MailMessage mail = new MailMessage(); mail.To.Add(TXTEMAIL.Text); mail.To.Add("NEELtravelz@gmail.com"); mail.From = new MailAddress("JAYESH.RIYO@gmail.com"); mail.Subject = "ADVERTISEMENT BILL"; // string str = str1; mail.IsBodyHtml = true; mail.Body = str1; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address smtp.Port = 587; smtp.UseDefaultCredentials = false; smtp ...

Go to the complete details ...