coding for send mail to user mail id varification

Posted by Mona.Agr1186 under ASP.NET on 4/8/2013 | Points: 10 | Views : 984 | Status : [Member] | Replies : 1
when user give mail id that mail id is available or not that is checked by through the mail and send the varification code or link




Responses

Posted by: aswinialuri-19361 on: 4/8/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Mona,
Try this i think it will help you
you will mention alternate email in your page then write like this
public void Alternate()
{

try
{
MailMessage msg = new MailMessage();
msg.From = new MailAddress("aswinialuri@gmail.com");
msg.To.Add(txtaltemail.Text);
msg.Body = "your msg sent";
msg.IsBodyHtml = true;
NetworkCredential Nc = new NetworkCredential("aswinialuri@gmail.com", "119239149@");
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = false;
smtp.Credentials = Nc;
smtp.Send(msg);
}

catch (Exception ex)
{
Response.Write(ex.Message);
}
lblresult.Text = "your new mail is succesful thanks for using my network";

}
I Think it is really useful to you
Thanks& Regards
Aswini Aluri

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Mona.Agr1186, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response