title: Use Mailkit to send out Email using Html template in .Net Core Application
body: <p>I'm  able to send out normal emails(with plain text body). I now want to send out emails using html templates. My template looks somewhat like this.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div
      style="
        @import url('https://fonts.googleapis.com/css2?family=Varela+Round&amp;display=swap');
        font-family: 'Varela Round', sans-serif;
        max-width: 600px;
        margin: 0 auto;
      "
    &gt;
      &lt;div
        style="
          width: 100%;
          height: 200px;
          border: solid 1px #cd5383;
          border-radius: 5px;
          padding: 5px;
          text-align: justify;
          font-size: 20px;
          line-height: 30px;
        "
      &gt;
        Hello {Ashish}, &lt;br /&gt;
        We have received your request to change password in our Portal&lt;br /&gt;
        &lt;div style="text-align: center; margin-top: 10px;"&gt;
          &lt;a target="_blank" href="https://www.google.com"&gt;
            &lt;button
              style="
                font-family: 'Varela Round', sans-serif;
                width: 150px;
                height: 37px;
                margin-left: 10px;
                background-color: #cd5383;
                border: none;
                color: #fff;
                box-shadow: 1px 1px 5px 1px gray;
              "
            &gt;
              Reset Password
            &lt;/button&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;p style="font-size: 15px; text-align: center; color: gray;"&gt;
          Facing any issue, contact {support@portal.com}
        &lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My code for creating the email looks like this :</p>
  
  <pre><code> var message = new MimeMessage();
   message.From.Add(new MailboxAddress("Portal",_configuration.GetSection("Email").GetSection("EmailAddress").Value));
   message.To.Add(new MailboxAddress(userDetails.CompanyEmail));
   message.Subject = "Password Reset Link";
   message.Body = new TextPart("html")
   {                   
  
   };
  </code></pre>
  
  <p>How can I send the email using this template now ?</p>