using (var imap = new Rebex.Net.Imap()) { // connect and login to Gmail IMAP server imap.Connect("imap.gmail.com", SslMode.Implicit); imap.Login(username, password); // get list of new messages in Inbox imap.SelectFolder("Inbox"); var list = imap.Search(ImapSearchParameter.Unread); // print subjects of those messages foreach (var info in list) { Console.WriteLine(info.Subject); } }
Mail library for C# and VB.NET developers. Provides all you need for sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mails messages.
Includes:
Keep your passwords and data secure. Using TLS/SSL to encrypt communication is as simple as it gets.
Supported features include:
Basic username/password authentication is often not good enough. That's why we support additional authentication methods such as NTLM, Kerberos (with single sign-on as well) or client certificate authentication.
Supports Visual Studio 2008, 2010, 2012, 2013, 2015 and 2017, Visual Studio for Mac.
Supports .NET Standard 1.5 (or higher) on .NET Core.
Experimental support for .NET Standard 1.5 (or higher) on platforms other than .NET Core.
Experimental support for Universal Windows Platform (Windows 10, Windows 10 Mobile, Windows 10 IoT).
Experimental support for Xamarin.Mac platform (assemblies are suitable for Xamarin.Mac Mobile and Xamarin.Mac .NET 4.5 Framework projects).
Learn more about supported standards and platforms.
Thousands of developers chose Rebex Secure Mail for adding SMTP, IMAP, POP3, MIME or S/MIME capabilities to their applications.
Rebex Secure Mail is a mature and stable component maintained since 2006. We have been adding new features year after year, inspired by user feedback. For example:
And many, many more...
"With Rebex IMAP library the number of support calls regarding IMAP protocol problems decreased to almost zero.
We are very happy with Rebex Secure Mail and can warmly recommend it to anybody."