[Mono-aspnet-list] SMTP problem with gmail

angel colmenares angel.ignacio.colmenares at gmail.com
Wed Dec 7 12:37:33 EST 2011

this code works fine for me (using mono-mod_mono...);

MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
mail.From = new MailAddress("USERNAME at gmail.com");
mail.To.Add("DEST-USERMAIL at gmail.com");
mail.Subject = "testing  gmail - mono";
mail.Body = "This is for testing SMTP mail from GMAIL";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("GMAIL-USERNAME",
SmtpServer.EnableSsl = true;
ServicePointManager.ServerCertificateValidationCallback = delegate(object s,
X509Certificate certificate, X509Chain chain, SslPolicyErrors
sslPolicyErrors) { return true; };
catch(Exception e){

View this message in context: http://mono.1490590.n4.nabble.com/SMTP-problem-with-gmail-tp4160046p4169823.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.

More information about the Mono-aspnet-list mailing list