title: How to encrypt password/email c#
body: <p>I am currently trying to get a debug mail up and running. The moment an error occurs it will send a mail with the error to the mail i use. But after letting somebody test it he actually got my mail password and mail out of it and decided to change the password.</p>
  
  <pre><code>public void Send() {
      MailMessage MailMesaji = new MailMessage();
      MailMesaji.Subject = "subject";
      MailMesaji.Body = "mail body";
      MailMesaji.From = "sender mail adress";
      this.MailMesaji.To.Add(new MailAddress("to mail adress"));
      System.Net.Mail.SmtpClient Smtp = new SmtpClient();
      Smtp.Host = "smtp.gmail.com"; // for example gmail smtp server
      Smtp.EnableSsl = true;
      Smtp.Credentials = new System.Net.NetworkCredential("account name", "password");
      Smtp.Send(MailMesaji);
  }
  </code></pre>
  
  <p>So i was wondering, is it possible to encrypt the account name and password to prevent stealing ? </p>
  
  <p>I am sorry if i did not search good enough, but could not find anything on how to encrypt email/password</p>