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