redirect one page to another page automatically sens SMS

Posted by Anilbabu.M under ASP.NET on 9/15/2012 | Points: 10 | Views : 1168 | Status : [Member] | Replies : 2
Any body help me I have one requirement like this

I am redirect home url to coupouns url send sms
For example redirect to coupouns page url send sms with coupn page url using asp.net....

Thank you,
anil

zzcc


Responses

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

Try this

private void button1_Click(object sender, EventArgs e)
{
try
{
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");

mail.From = new MailAddress("your_email_address@gmail.com");
mail.To.Add("to_address");
mail.Subject = "Test Mail";
mail.Body = "This is for testing SMTP mail from GMAIL";

SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
SmtpServer.EnableSsl = true;

SmtpServer.Send(mail);
MessageBox.Show("mail Send");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}

refer this
http://www.codeproject.com/Articles/1684/Sending-Mail-Using-C-via-SMTP


Mark as Answer if its helpful to you

Anilbabu.M, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

Anilbabu.M, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response