try
{
SmtpClient client = new SmtpClient("smtp.live.com", 25);
NetworkCredential cred = new NetworkCredential("emailFrom", "password");
MailMessage Msg = new MailMessage();
Msg.From = new MailAddress(txtEmailFrom.Text);
Msg.To.Add(txtEmailTo.Text);
Msg.Subject = txtEmailSubject.Text;
Msg.Body = txtEmailContent.Text;
client.Credentials = cred;
client.EnableSsl = true;
lblConfirmation.Text = "Mail Sended Succesfully";
client.Send(Msg);
}
catch{
lblConfirmation.Text = "Error";
}