It’s common in our application code to want to send out email notifications to users, but when we are testing locally we don’t necessarily want to actually send out emails to a real server. SMTP4Dev makes it easy to test locally with a fake SMPT server that lets you inspect the email messages that you are sending.
SMTP4Dev - https://github.com/rnwood/smtp4dev
MailKit - https://www.nuget.org/packages/MailKit/
Sample Code - https://github.com/AspNetMonsters/EP210_MimeKitSendEmailToSmtp4Dev