1. Products
  2.   Email
  3.   .NET
  4.   MailSystem
 
  

Open Source C# .NET Email Library for IMAP, POP3 & SMTP

Free C# .NET Library for Generating & Sending Emails with Attachments supporting SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard & vCalendar. 

MailSystem.NET is an open source library that enables software developers to manage emails using .NET commands. The library is very flexible and supports managing emails using SMTP, POP3, IMAP, and several other email protocols. The library supports asynchronous operations and allows mail signing & encryption as well as decryption using S/MIME & OpenPGP. The library has included separate objects for the message as well as the clients.

The MailSystem library is very easy to use and has included support for several important features related to email messages. It has included support for SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard, vCalendar, Anti-Spam (Bayesian, RBL, DomainKeys), Queueing, Mail Merge, and much more. It also provides support for mail queuing system as well as support for individual queries of all types,

The MailSystem library is very easy to use and has included support for several important features related to email messages. It has included support for SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard, vCalendar, Anti-Spam (Bayesian, RBL, DomainKeys), Queueing, Mail Merge, and much more. It also provides support for mail queuing system as well as support for individual queries of all types.

There are several important features included related to Simple Mail Transfer Protocol and Post Office Protocol 3 such as message count support, display mailbox size, download complete message or header only, secure authentication, embedded image, sounds or videos, send emails directly without an SMTP server, use HTML and Text emails, enhanced caching performance and many more.

Previous Next

Getting Started with MailSystem

The easiest way to install MailSystem is via NuGet. To use it from Visual Studio’s Package Manager Console, please enter the following command.

install MailSystem via NuGet

Install-Package MailSystem.Net-trunk  

Install MailSystem via GitHub 

git clone https://github.com/pmengal/MailSystem.NET.git 

Email Message Sending via C#

The MailSystem.NET library has included functionality for composing and sending email messages using C# .NET code. The library is very feature-rich and has included several important ways for sending email messages such as send an email message with an attachment, send emails to multiple users, sending messages asynchronously, sending encrypted email messages, sending email to multiple recipients, sending with multiple bodies, sending an email with or without SMTP server and many more.

Retrieve Email Messages via C#

The Open Source API MailSystem.NET library enables software developers to access and retrieve email messages inside their C# applications with ease. The library has included several important functions related to retrieving email messages retrieve message asynchronously, retrieve message count, retrieve the message from secure connections, retrieve message list, retrieve a specific message, retrieve to a file, and many more.

How to Get Email Messages via C# Library?

private const string _imapLogin = "[login]";
private const string _imapPassword = "[password]";
private const int _imapPort = 993;
private const string _imapServerAddress = "imap.gmail.com";

var _selectedMailBox = "INBOX";
using (var _clientImap4 = new Imap4Client())
{

  clientImap4.ConnectSsl(_imapServerAddress, _imapPort);
  // another option is: _clientImap4.Connect(_mailServer.address, _mailServer.port);

  _clientImap4.Login(_imapLogin, _imapPassword); // Make log in and load all MailBox.
  //_clientImap4.LoginFast(_imapLogin, _imapPassword); // Only make login.

  var _mailBox = _clientImap4.SelectMailbox(_selectedMailBox);

 foreach (var messageId in _mailBox.Search("ALL").AsEnumerable())
  {
    var message = _mailBox.Fetch.Message(messageId);
    var _imapMessage = Parser.ParseMessage(message);
  }

_clientImap4.Disconnect();
}

Email Attachment Handling via .NET

The free MailSystem.NET library enables software developers to work with email attachments inside their own .NET applications. The library supports adding multiple files, retrieve attachments and save them to disk, working with encoding and chart-set, and more. The library has provided support for attaching and sending files like PDF, Microsoft Word, Images and many more.

 English