title: Unable to connect to remote server
body: <p>I am new to C# and I am trying to send an email from a desktop program I am developing. Here is the code I am using but I keep getting the error below :</p>
  
  <pre><code>System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
  message.To.Add("thesma@gmail.com");
  message.Subject = "This is the Subject line";
  message.From = new System.Net.Mail.MailAddress("ideas@gmail.com");
  message.Body = "This is the message body";
  System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com",578);
  smtp.EnableSsl = true;
  smtp.Send(message);
  </code></pre>
  
  <p>I can't seem to find out what the problem is...</p>