title: SMTP settings in appSettings.json in dotnet core 2.0
body: <p>In Asp.net, I can normally send emails using the following code:</p>
  
  <pre><code>using (var smtp = new SmtpClient())
  {
      await smtp.SendMailAsync(mailMessage);
  }
  </code></pre>
  
  <p>With the smtp settings being provided in the web.config, which are then automatically used by the <code>SmtpClient</code>. The web.config config section looks like:</p>
  
  <pre><code>&lt;mailSettings&gt;
      &lt;smtp deliveryMethod="Network"&gt;
        &lt;network host="myHost" port="25" userName="myUsername" password="myPassword" defaultCredentials="false" /&gt;
      &lt;/smtp&gt;
  &lt;/mailSettings&gt;
  </code></pre>
  
  <p>Is it possible to have config in the appSettings.json file in a dotnet core 2.0 application, which can then be used by the <code>SmtpClient</code>, similar to Asp.net?</p>