[Mono-list] send a mail using mono

Rolando Martinez rolandomartinezg at gmail.com
Tue Sep 9 00:19:46 EDT 2008


Hi,
I would like what is way to send a mail. Currently I got the "time out"
error message using this code:
    public static string sendMail ( string to, string cc,
        string subject, string body)
        {

            MailMessage mail = new MailMessage();

            mail.From = new MailAddress("xxxx at gmail.com");
            mail.To.Add(to);

            mail.Subject = subject;
            mail.Body = body;

            SmtpClient smtp = new SmtpClient("smtp.uach.cl", 465);

            smtp.Credentials = new NetworkCredential("xxxx at gmail.com",
                                                  "xxxxx");
            smtp.Send(mail);

            return "email exitoso";
}

Any Ideas or alternatives solutions?

Regards,
Rolando.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080909/583d7cc3/attachment.html 


More information about the Mono-list mailing list