title: Log4net- dynamic configuration properties for smtpAppender
body: <p>I use log4net for send mails to my app users.
  I must to have dynamic configuration for doing it.
  So I tried using GlobalContext.Properties for this, but it doesn't work!</p>
  
  <p>Here is my code of original appender:</p>
  
  <pre><code>   &lt;appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"&gt;
    &lt;to value="myAddress@myComp.com" /&gt;
    &lt;from value="myAddress@myComp.com" /&gt;
    &lt;subject value="test logging message" /&gt;
    &lt;smtpHost value="out.bezeqint.net" /&gt;
    &lt;username value="myUserName" /&gt;
    &lt;password value="myPassword /&gt;
    &lt;authentication value="Basic" /&gt;
    &lt;bufferSize value="512" /&gt;
    &lt;lossy value="true" /&gt;
    &lt;evaluator type="log4net.Core.LevelEvaluator"&gt;
      &lt;threshold value="ERROR" /&gt;
    &lt;/evaluator&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="%date %newline%newline - %message%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>at c#:</p>
  
  <pre><code>  ILog emailLog = log4net.LogManager.GetLogger("EmailLogger"); 
          log4net.Config.XmlConfigurator.Configure(emailLog.Logger.Repository);
  
          emailLog.Error("test aaa");
  </code></pre>
  
  <p>It works well.
  But, I tried to replace one of the properties to be dynamic- and it not works, the message have not sended.</p>
  
  <p>at appender:</p>
  
  <pre><code>  &lt;to value="%property{emailTo}" /&gt;
  </code></pre>
  
  <p>at C#:</p>
  
  <pre><code>  log4net.GlobalContext.Properties["emailTo"] = "myAddress@myComp.com";
          ILog emailLog = log4net.LogManager.GetLogger("EmailLogger"); 
          log4net.Config.XmlConfigurator.Configure(emailLog.Logger.Repository);
  
          emailLog.Error("test aaa");
  </code></pre>