Código:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;
namespace Mail
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MailMessage msg = new MailMessage();
msg.To.Add(new MailAddress("prueba@prueba.com"));
msg.From = new MailAddress("nodata56@gmail.com");
msg.Subject = "prueba";
msg.Body = "como estas";
SmtpClient clienteSmtp = new SmtpClient("WIN02");
try
{
clienteSmtp.Send(msg);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
ALguna idea? El ejemplo lo saque de aqui http://www.devjoker.com/contenidos/Articulos/291/Enviar-email-con-C.aspx