0 votes

We use Magic XPA as our development language which allows us to embed and integrate any .Net control to call from within our application. Once a .NET assembly is loaded, all of its classes and methods are available for use in the Magic xpa Studio. We ideally want to be able to interrogate a mail box on our IMAP mail server using using a TLS secure logon connection and download certain messages to a drive in .msg format. Do you have something we could load that will do this for us? If so can you please send me some more information on what you have including pricing?

by

1 Answer

0 votes

You can use Mail.dll https://www.limilabs.com/mail to connect to your IMAP server and download email messages. Mail.dll supports SSL and TLS protocols.

Messages in IMAP/POP3 and SMTP use eml plain text MIME format,
and this can be written to disk:

using(Imap imap = new Imap())
{
  imap.ConnectSSL("imap.example.com");   
  imap.UseBestLogin("user", "password");

  imap.SelectInbox();
  List<long> uids = imap.Search(Flag.Unseen);

  foreach (long uid in uids)
  {
        var eml = imap.GetMessageByUID(uid);

        // Write to disk:
        File.WriteAllByte($"c:\\email{uid}.eml", eml);

        // Parse eml MIME data:
        IMail email = new MailBuilder()
                .CreateFromEml(eml);

        Console.WriteLine(email.Subject);
   }
}

Msg is proprietary Microsoft format, and Mail.dll can only read those.

This article shows how to download unseen messages from IMAP:
https://www.limilabs.com/blog/receive-unseen-emails-using-imap

You can find many samples here:
https://www.limilabs.com/mail/samples

You can find pricing info here:
https://www.limilabs.com/mail/purchase

Most common Q and A are here:
https://www.limilabs.com/mail/help

by (301k points)
...