Hi
MailMessage message = new MailMessage();
message.From = new MailAddress("userid@yahoo.com");
message.To.Add(new MailAddress("ngqandu.anele@gmail.com"));
message.Subject = subject.Text;
message.Body = body.Text;
SmtpClient client = new SmtpClient();
client.Credentials = new System.Net.NetworkCredential ("userid@yahoo.com", "password");
client.Port = 587;
client.Host = "smtp.mail.yahoo.com";
client.EnableSsl = false;
try
{
client.Send(message);
}
catch (Exception ex)
{
MessageBox.Show
(ex.Message,"Information",MessageBoxButton.OK,MessageBoxImage.Information);
}