Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

How can I send an e-mail by PasswordRecovery class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Husam - 11 Jun 2007 12:51 GMT
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 :

<system.net>
   <mailSettings>
     <smtp from ="husam_108@yahoo.com">
       <network host="127.0.0.1" port="25" />
     </smtp>
   </mailSettings>
 </system.net>

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

imports System.net.mail

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

MyMail.Body = "Dear User your password is: "
smtpserver.Send("husam_108@yahoo.com", "husamalahmadi@gmail.com", "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

regrad's

husam
Mike - 11 Jun 2007 13:15 GMT
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 127.0.0.1 (localhost)?

> Hi EveryBody:
>
[quoted text clipped - 35 lines]
>
> husam
Juan T. Llibre - 11 Jun 2007 13:25 GMT
Re:
!> How can I send an e-mail by PasswordRecovery class

Please compare your code to the sample code provided at :

http://msdn2.microsoft.com/en-us/library/ms178335(vs.80).aspx

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.passwordrecov
ery.aspx


Notice the web.config entries which you are, apparently, missing.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Hi EveryBody:
>
[quoted text clipped - 33 lines]
>
> husam

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.