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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
savioPosted Jun 16, 2009, 2:48 AM
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.