Skip to content
Daniel Collingwood edited this page Nov 25, 2022 · 14 revisions

MailKitSimplified

Sending and receiving emails sounds simple, after all, electronic mail existed decades before the Internet. If you're looking for an all-in-one .NET solution for email, you'll quickly discover MailKit is recommended by even the likes of Microsoft due to how it implements the RFC standard. Unfortunately the downside of doing it all is that MailKit can be difficult to set up and use, especially the first time you go to try something like working with attachments or writing a reply. The aim of this package is to make sending and receiving emails as simple as possible!

SMTP with MailKitSimplified.Sender

Sending an email is now as easy as:

using var smtpSender = SmtpSender.Create("localhost")
await smtpSender.WriteEmail.To("test@localhost").SendAsync();

IMAP with MailKitSimplified.Receiver

Receiving emails is now as easy as:

using var imapReceiver = ImapReceiver.Create("imap.example.com")
var mimeMessages = await imapReceiver.ReadFrom("INBOX").GetMimeMessagesAsync();

Example Usage

Examples of more advanced features like a hosted service or an ASP.NET API can be found in the GitHub samples.

Clone this wiki locally