In c-sharpcorner site...
When we click on forget password then two fileds show 1.enter your email id 2. enter username
and when we enter anyone then the password "sends to our email id" ...
How can i create this application in my project..
Pls help
Thanks
Chester !
Loading
Kirtan PatelPosted Nov 22, 2009, 8:59 AM
using System.Net;
using System.Net.Mail
//Replace this with your own correct Gmail Address
string from = "[email protected]";
//Replace this with the Email Address to whom you want to send the mail
string to = "[email protected]";
MailMessage mail = new System.Net.Mail.MailMessage();
mail.To.Add(to);
mail.From = new MailAddress(from, "One Ghost" , System.Text.Encoding.UTF8);
mail.Subject = "This is a test mail" ;
mail.SubjectEncoding = System.Text.Encoding.UTF8;
mail.Body = "This is Email Body Text";
mail.BodyEncoding = System.Text.Encoding.UTF8;
mail.IsBodyHtml = true ;
mail.Priority = MailPriority.High;
SmtpClient client = new SmtpClient();
//Add the Creddentials- use your own email id and password
client.Credentials = new System.Net.NetworkCredential("yourgmail Address", "Your Gamil Password");
client.Port = 587; // Gmail works on this port
client.Host = "smtp.gmail.com";
client.EnableSsl = true; //Gmail works on Server Secured Layer
client.Send(mail);
Chester BenningtonPosted Nov 22, 2009, 8:16 AM
i have created the db manually with tables like login,new users etc...
thats why i am asking i want to know only one think how the mail send to email id only i know the forget password code fetching from backend
thanks
chester !
Kirtan PatelPosted Nov 22, 2009, 8:00 AM