Hi there
I am told that gmail uses TLS for outgoing email. Is there a way to send an email to a gmail server using C#?
Ryan
Hi there
I am told that gmail uses TLS for outgoing email. Is there a way to send an email to a gmail server using C#?
Ryan
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
savio4 reputationPosted Jun 15, 2009, 10:48 PM EDT
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
mail.Subject = "Test Mail";
mail.Body = "This is for testing SMTP mail from GMAIL";
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
SmtpServer.EnableSsl = true;
full source code
http://csharp.net-informations.com/communications/csharp-smtp-mail.htm
savio.