PC Review


Reply
Thread Tools Rate Thread

How can I send an e-mail by PasswordRecovery class

 
 
=?Utf-8?B?SHVzYW0=?=
Guest
Posts: n/a
 
      11th Jun 2007
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 ="(E-Mail Removed)">
<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("(E-Mail Removed)", "(E-Mail Removed)", "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
 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      11th Jun 2007
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)?



"Husam" <(E-Mail Removed)> wrote in message
news:EA30AF10-4FEE-4C34-9397-(E-Mail Removed)...
> 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 ="(E-Mail Removed)">
> <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("(E-Mail Removed)", "(E-Mail Removed)",
> "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



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      11th Jun 2007
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/lib...drecovery.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/
======================================
"Husam" <(E-Mail Removed)> wrote in message
news:EA30AF10-4FEE-4C34-9397-(E-Mail Removed)...
> 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 ="(E-Mail Removed)">
> <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("(E-Mail Removed)", "(E-Mail Removed)", "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




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using passwordRecovery Tony Johansson Microsoft ASP .NET 0 8th Jan 2010 12:40 AM
Windows-Mail - invitation not send by mail - meeting not send by mail Dirk Lehmann Windows Vista Mail 7 12th May 2008 07:16 PM
PasswordRecovery - Sending Mail =?Utf-8?B?UmFq?= Microsoft ASP .NET 0 28th Mar 2007 01:08 AM
ASP.NET 2.0 question: Login and passwordrecovery with e-mail address Arjen Microsoft ASP .NET 0 6th Jun 2005 07:09 PM
Send Mail: The current document type can not be sent as mail. Would you like to send a shortcut instead? faels Windows XP Internet Explorer 7 12th Aug 2004 04:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:26 AM.