title: Protecting an email password when using NLog
body: <p>When using NLog as a logging instrument we can easily send messages via email, for example this is the example configuration for using Gmail as a smtp server:</p>
  
  <pre><code>&lt;targets&gt;
  &lt;target name="gmail" type="Mail"
          smtpServer="smtp.gmail.com"
          smtpPort="587"
          smtpAuthentication="Basic"
          smtpUsername="user@gmail.com"
          smtpPassword="password"
          enableSsl="true"
          from="emailaddress@gmail.com"
          to="recipient@example.com"
          cc="alice@example.com;bob@example.com;charlie@example.com"
        /&gt;
  &lt;/targets&gt;
  &lt;rules&gt;
   &lt;logger name="*" minlevel="Debug" writeTo="gmail" /&gt;
  &lt;/rules&gt;
  </code></pre>
  
  <p>It works like a charm.
  But in the above example the password is put in plain text in a configuration file.<br>
  <strong>Is there a way to protect it somehow?</strong></p>