1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mailing forgetpassword to user in asp.net 2.0

Discussion in 'ASP.NET' started by manojkumarmaithil, Apr 24, 2009.

  1. manojkumarmaithil

    manojkumarmaithil New Member

    Joined:
    Jun 18, 2007
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    0
    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
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,293
    Likes Received:
    365
    Trophy Points:
    83
    GMail smtp is a secured one and would require the right username and password to send the email.
     

Share This Page