title: How do I send email from C# without revealing my password?
body: <p>I found a great way to send email in C#, except for one problem, I have to show my password. If anyone were to disassemble my program, or if I decided to make it open source (which I probably will) they would get the username and password for my gmail account. Is there any way to get around this?</p>
  
  <pre><code>MailMessage mail = new MailMessage();
  SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
  
  mail.From = new MailAddress("Contact@pandorafreed.com");
  mail.To.Add("myemail@gmail.com");
  mail.Subject = "Pandora Free-D Message";
  mail.Body = "Name: " + C.NameBox.Text + "\n" + "Email: " + C.emailBox.Text + "\n" + C.Message.Text;
  
  SmtpServer.Port = 587;
  SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password");
  SmtpServer.EnableSsl = true;
  
  SmtpServer.Send(mail);
  </code></pre>
  
  <p>+++++EDIT+++++</p>
  
  <p>hmmm... would localhost work? Anyone know?</p>