How can I send an e-mail by PasswordRecovery class

Discussion in 'ASP .Net' started by Guest, Jun 11, 2007.

  1. Guest

    Guest Guest

    Hi EveryBody:

    I use the PasswordRecovery Class to recover the user password, as we know
    there is
    some setting that must be done to config the mail, I but the following code
    into my web config file :

    <smtp from ="">
    <network host="" port="25" />

    also the code that I use it in to my application is as followe:


    Dim smtpserver As New SmtpClient
    smtpserver.Host = ""
    Dim MyMail As MailMessage = New MailMessage()
    MyMail.BodyEncoding = Encoding.UTF8
    MyMail.IsBodyHtml = True

    MyMail.Body = "Dear User your password is: "
    smtpserver.Send("", "", "Password
    Recovery", MyMail.Body)

    But I still did not recive the messge.

    Can Some body tell me if there is a problem in my code or any redirection
    will be appreciated


    Guest, Jun 11, 2007
    1. Advertisements

  2. Guest

    Mike Guest

    do you have SMTP configured on your local web server your using?
    Check the 'bad mail' folder on your server and see if you have any files in
    there. If so then your email isn't being sent due most likely by not having
    your SMTP server configured. Do you have an actualy SMTP server you can test
    against instead of (localhost)?
    Mike, Jun 11, 2007
    1. Advertisements

  3. Juan T. Llibre, Jun 11, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.