title: How do I use mailSettings\smtp with both the configSource and from attributes?
body: <p>I am trying to clean up our web.config file such that per-deployment specific stuff is not kept in the main config. I have managed with the connections strings and some of the <code>mailSettings</code>, but I need the <code>from</code> attribute as well as the <code>configSource</code>, but this doesn't seem to be allowed.</p>
  
  <p>Currently I have this:</p>
  
  <p>web.config:</p>
  
  <pre><code>&lt;system.net&gt;
      &lt;mailSettings &gt;
        &lt;smtp configSource="email.config" from="me@blahblah.com" /&gt;
      &lt;/mailSettings&gt;
      &lt;defaultProxy&gt;
          &lt;proxy bypassonlocal="True" usesystemdefault="False" /&gt;
      &lt;/defaultProxy&gt;
  &lt;/system.net&gt;
  </code></pre>
  
  <p>email.config</p>
  
  <pre><code>&lt;network host="myhost" password="" userName="" /&gt;
  </code></pre>
  
  <p>Ideally I would have the set the <code>configSource</code> on either <code>mailSettings</code> or <code>system.net</code>, but this isn't supported.</p>
  
  <p>Is there a better way to do this?</p>