Re: email con mono

"Juan C. Olivares" <[email protected]>
Newsgroups gmane.comp.gnome.mono.hispano
Message-ID <[email protected]>
Christian:
Usé tu código y funcionó muy bien. Lo compilé como gmcs y ejecuté con mono
2.4.

On Mon, Aug 10, 2009 at 3:12 PM, christian valdivia <
[email protected]> wrote:

> public class enviarMensajeCorreo
>        {
>
>                public enviarMensajeCorreo()
>                {
>
>                                System.Net.Mail.MailMessage Mensaje = new
> System.Net.Mail.MailMessage();
>                                Mensaje.From = new
> System.Net.Mail.MailAddress("[email protected]", "miNombre",
> System.Text.Encoding.UTF8);
>                                Mensaje.To.Add("
> [email protected]");
>                                Mensaje.Subject = "saludos";
>                                Mensaje.Body = "este es un mensaje";
>                                Mensaje.SubjectEncoding =
> System.Text.Encoding.UTF8;
>                                Mensaje.BodyEncoding =
> System.Text.Encoding.UTF8;
>                                Mensaje.IsBodyHtml = false;
>
>                                System.Net.Mail.SmtpClient smtpcliente = new
> System.Net.Mail.SmtpClient();
>                                smtpcliente.Credentials = new
> System.Net.NetworkCredential("micorreo@gmai.", "micontraseña");
>                                smtpcliente.Port = 587;
>                                smtpcliente.Host = "smtp.gmail.com";
>
>                                smtpcliente.EnableSsl = true;
>                        try {
>                                smtpcliente.Send(Mensaje);
>
>                                System.Console.WriteLine("mensaje enviado");
>
>                        } catch (System.Net.Mail.SmtpException e) {
>                                System.Console.WriteLine(e);
>                        }
>                }
>        }
>



-- 
Atte,
Juan Cristóbal Olivares
חואנכרי

==============

Renovarse o morir: Mi PC de los sesenta tenía veinte mil militantes. Y mi PC
del siglo XXI tiene cuarenta gigabytes.

_______________________________________________
Mono-hispano mailing list
[email protected]
https://listas.hispalinux.es/mailman/listinfo/mono-hispano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.