mailing forgetpassword to user in asp.net 2.0

Go4Expert Member
24Apr2009,20:39   #1
manojkumarmaithil's Avatar
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
Go4Expert Founder
25Apr2009,13:09   #2
shabbir's Avatar
GMail smtp is a secured one and would require the right username and password to send the email.