473,379 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How can I send an e-mail by PasswordRecovery class

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 ="hu*******@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("hu*******@yahoo.com", "hu***********@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
Jun 11 '07 #1
2 4581
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" <Hu***@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
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 ="hu*******@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("hu*******@yahoo.com", "hu***********@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

Jun 11 '07 #2
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/lib...35(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" <Hu***@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.com...
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 ="hu*******@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("hu*******@yahoo.com", "hu***********@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


Jun 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom Brown | last post by:
Hi, I have what seems to be a simple problem. But I can not for the life of me find a way to send an integer over a socket. The send method will only accept strings. Here is what I am trying to...
9
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
5
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via...
1
by: Kitchen Bin | last post by:
Hi. I am trying to use Sockets to do multiple Send and Receives via HTTP (not simultaneously). A first pair of Send/Receives works fine and sure enough I receive HTML back, but the next...
0
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it...
1
by: GrantS | last post by:
I need to use a sendkeys key combination to automate the "accept files" that a remote user wants to send to me via Windows messenger. I am using automation to work with Windows Messenger client in...
3
by: Sara | last post by:
HI, I want to code a program to detect GSM mobile (any kind) which connected through serial port to computer and then be able to send SMS through this mobile phone to other mobile phones, could...
1
by: Hasan O | last post by:
hi , I have a problem with socket.send mesajlar = Encoding.ASCII.GetBytes("UGIR"); socketResultValue = socket.Send(mesajlar,0,mesajlar.Length, SocketFlags.None); socketResultValue =...
3
by: ultr | last post by:
Hello, I have read that send() may not send whole message and returns the nuber of bytes sent, so that we can handle the rest of the message. Is it true, because i have tested sending even 1MB...
0
by: Xionbox | last post by:
Hello everybody, The error I have seems very easy to solve, but for some odd reason I can't seem to solve it. Anyways, here's my "setup". I created a server running on localhost:1200 (telnet...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.