Search Wiki:
Resource Page Description
I have a page that you can use as reference if you want to send an email from you private email accounts (not using localhost smtp clients), yeah!! using gmail, hotmail, yahoo... any!!!

protected void cmdEnviar_Click(object sender, EventArgs e)
{
System.Net.Mail.MailMessage mensaje = new System.Net.Mail.MailMessage "your_email_name@gmail.com", "destiny_mail@hotmail.com", "lalalalala", "blablablabla");

//Los valores de host y puerto son los de hotmail, live y gmail

System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
client.EnableSsl = true;

//Las credenciales son las originales del correo electrónico
client.Credentials = new System.Net.NetworkCredential("your_email_name@gmail.com", "your_password");

try
{
client.Send(mensaje);
}
catch (Exception ex)
{
lblErrors.Text = ex.ToString();
}
}


Additional information on starting a new resource page is available here: Resource Page Startup Guide.
Last edited Dec 11 2009 at 6:29 PM  by aebordones, version 2
Updating...
Page view tracker