mailing forgetpassword to user in asp.net 2.0

manojkumarmaithil's Avatar, Join Date: Jun 2007
Go4Expert Member
hello friends,

I just going to use passwordrecovery tool of asp.net for forgetpassword. But when i use this to send mail but it not work. However massege flash that password has been sent. Can anybody help me whats wrong with my code

Code:
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
    {
SmtpClient smtp = new SmtpClient("smtp.gmail.com");
        smtp.Host = "smtp.gmail.com";

        smtp.Credentials = new System.Net.NetworkCredential("username@gmail.com", "pwd");
        smtp.EnableSsl = true;
        smtp.Port = 587;
}
thanks
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
GMail smtp is a secured one and would require the right username and password to send the email.