Send email from .Net – MAPI

You need to send an email from your thick client .Net app (winforms or WPF), but don’t want to mess with using MailMessage and configuring it to use a remote server etc.

Instead, you can use MAPI and just pop open a new message using your default installed email client (often outlook, but any mapi compliant email client will work).

This article on codeproject gives excellent coverage of this topic http://www.codeproject.com/Articles/17561/Programmatically-adding-attachments-to-emails-in-C

Beware that this is a good thing to use for occasional emails, not for heavy sending. MAPI has some known issues with memory management when called via interop from .Net, so if you make heavy use of it you will likely crash.

Also, since MAPI only works with locally installed email clients, it will not work with a web based one (ie, gmail).