hi i am using asp.net (VS 2005), the password recovery control gives me the foll 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. b4sm1464356tic.36

i have a gmail account, the details of which have been entered in the asp.net config file with the help of the browser interface tool ( applications > smtp settings ). the properties of the control has also been set ( mail definition ).

Please help

Solved it myself

protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
MailMessage message = e.Message;

try
{
SmtpClient smtp = new SmtpClient();
smtp.EnableSsl = true;
smtp.Send(message);
}
catch (Exception ex)
{
throw new Exception("There was a problem sending the email.", ex);
}

e.Cancel = true;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.