views:

314

answers:

2

Hi All, I've gone through all helps and all forums., but none of them have helped me. Here is my problem

  1. Developing a site on localhost using ASP.NET 3.5
  2. I want to provide 'forgot password' functionality using <asp:PasswordRecovery>
  3. Any real help is greatly appreciated. Please note that I want to send it by either changing web.config OR programatically.

Thanks

+2  A: 

There is an article on MSDN explaining how to use the PasswordRecovery control.

There is also a thread specifically regarding using GMail with the control.

I believe that the best way is to use the SendingMail event method and send your own email, thus setting the MailMessage object and the SmtpClient object within the method. Then, set the Cancel property to true, so that the other email won't be sent.

I have not tried it myself though. If you want more specific help, show what you have tried and why it doesn't work.

Mark Byers
A: 

You can set smtp via web config:

<system.net>
        <mailSettings>
            <smtp deliveryMethod="Network" from="[email protected]">
                <network defaultCredentials="true" host="localhost" port="25" userName="kaushal" password="testPassword"/>
            </smtp>
        </mailSettings>
    </system.net>
Flatlineato