title: How to make Log4Net send an Email with the From value set to the current users email address
body: <p>On the <a href="http://logging.apache.org/log4net/release/config-examples.html" rel="noreferrer">Log4Net Config Examples</a> webpage it shows examples on how to setup a SmtpAppender.</p>
  
  <p>So I added the following settings into my app.config file, and it successfully sends an Email when a Warning or higher is logged (which is good).</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;appender name="EmailAppender" type="log4net.Appender.SmtpAppender"&gt;
    &lt;to value="me@mycompany.com" /&gt;
    &lt;from value="me@mycompany.com" /&gt;
    &lt;subject value="test logging message" /&gt;
    &lt;smtpHost value="smtpserver.mycompany.com" /&gt;
    &lt;lossy value="true" /&gt;
    &lt;evaluator type="log4net.Core.LevelEvaluator"&gt;
      &lt;threshold value="WARN"/&gt;
    &lt;/evaluator&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>But the <strong>From</strong> value is hard coded with my Email address.</p>
  
  <p>My application is a WinForms app and it's going to be deployed to users PC's, so it would be very handy to know which user encountered the warning / error.</p>
  
  <p>Is is possible to set up a Log4Net SmtpAppender so that the From value uses the current users Email Address?</p>
  
  <p>Thank you for your help.</p>