ng <code>IEmailSender</code>, for example:</p>
<pre><code class="lang-cs">public class MyEmailSender : IEmailSender
{
  public void SendEmail(MimeMessage message);
  public void SendEmailAsync(MimeMessage message);
}
</code></pre>
<p>then register it via <code>AuthEndpointsBuilder.AddEmailSender</code>:</p>
<pre><code class="lang-cs">builder.AddEmailSender&lt;MyEmailSender&gt;();
</code></pre>
<p>Learn more about using MailKit <a href="https://github.com/jstedfast/MailKit#using-mailkit">here</a></p>
</artic