Mail.dll 3.0.19162.1801

Mail.dll is a .NET IMAP component, POP3 component and SMTP component library. Includes an email and MIME parser. Allows sending, receiving and processing email messages in .NET applications. Includes SSL and TLS support along with OAuth and DKIM capabilities. Includes secure MIME (S/MIME) parser for processing encrypted and signed emails. Contains iCal, vCard and Outlook's msg files parsers. Decodes winmail.dat attachments.

Install-Package Mail.dll -Version 3.0.19162.1801
dotnet add package Mail.dll --version 3.0.19162.1801
<PackageReference Include="Mail.dll" Version="3.0.19162.1801" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mail.dll --version 3.0.19162.1801
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Quick start samples

IMAP

using(Imap imap = new Imap())
{
       imap.Connect("imap.server.com");  // or ConnectSSL for SSL/TLS
       imap.UseBestLogin("user", "password");

       imap.SelectInbox();
       List<long> uids = imap.Search(Flag.Unseen);
       foreach (long uid in uids)
       {
           var eml = imap.GetMessageByUID(uid);

           IMail email = new MailBuilder().CreateFromEml(eml);

           Console.WriteLine(email.Subject);
       }
       imap.Close();
}

POP3

using(Pop3 pop3 = new Pop3())
{
    pop3.Connect("pop3.server.com");  // or ConnectSSL for SSL/TLS     
    pop3.UseBestLogin("user", "password");

    List<string> uids = pop3.GetAll();
    foreach (string uid in uids)
    {
        var eml = pop3.GetMessageByUID(uid);

        IMail email = new MailBuilder().CreateFromEml(eml);

        Console.WriteLine(email.Subject);
    }
    pop3.Close();
} 

Quick start samples

IMAP

using(Imap imap = new Imap())
{
       imap.Connect("imap.server.com");  // or ConnectSSL for SSL/TLS
       imap.UseBestLogin("user", "password");

       imap.SelectInbox();
       List<long> uids = imap.Search(Flag.Unseen);
       foreach (long uid in uids)
       {
           var eml = imap.GetMessageByUID(uid);

           IMail email = new MailBuilder().CreateFromEml(eml);

           Console.WriteLine(email.Subject);
       }
       imap.Close();
}

POP3

using(Pop3 pop3 = new Pop3())
{
    pop3.Connect("pop3.server.com");  // or ConnectSSL for SSL/TLS     
    pop3.UseBestLogin("user", "password");

    List<string> uids = pop3.GetAll();
    foreach (string uid in uids)
    {
        var eml = pop3.GetMessageByUID(uid);

        IMail email = new MailBuilder().CreateFromEml(eml);

        Console.WriteLine(email.Subject);
    }
    pop3.Close();
} 

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.19162.1801 18,038 6/11/2019
3.0.19134.1431 6,125 5/14/2019
3.0.19029.1200 16,006 2/1/2019
3.0.18307.847 20,250 11/3/2018
3.0.18201.1449 22,955 7/20/2018
3.0.18165.2350 8,434 6/14/2018
3.0.18151.1319 5,751 5/31/2018
3.0.18072.1009 7,689 3/13/2018
3.0.18026.1647 14,600 1/26/2018
3.0.17312.2008 28,368 11/8/2017