a ver si este te funca amigo
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.To.Add(tpara.Text);//Destinatario
msg.From = new MailAddress(tde.Text, "Nombre de Usuario", System.Text.Encoding.UTF8);//Emisor y nombre de usuario
msg.Subject = tasunto.Text;//Asunto del mensaje
msg.SubjectEncoding = System.Text.Encoding.UTF8;
msg.Body = tmensaje.Text;//Mensaje a ser enviado
msg.BodyEncoding = System.Text.Encoding.UTF8;
msg.IsBodyHtml = false;
if (sw==true)
{
String sFile = archivo;//conine la ruta del archivo Adjunto
Attachment oAttch = new Attachment(sFile);
msg.Attachments.Add(oAttch);//adjuntamos el archivo al mensaje
}
SmtpClient client = new SmtpClient();
client.Credentials = new System.Net.NetworkCredential("(Emisor@hotmail.com)", "Contraseña");
//hotmail
client.Port = 587; // ùerto de envio tanto de Hotmail como para Gmail
client.Host = "smtp.live.com";// Protocolo Simple de Transferencia de Correo de (Hotmail)
//
client.EnableSsl = true;
try
{
client.Send(msg);//Enviamos el mensaje
MessageBox.Show("Mensaje Enviado Correctamente", "Correo C#", MessageBoxButtons.OK, MessageBoxIcon.Information);
sw = false;
}
catch (System.Net.Mail.SmtpException)
{
MessageBox.Show("Error");
}