Christian, I was finally able to test out the Email Viewer sample project that's included with the MBS plugins and based on my preliminary testing, it looks like it works fine for parsing out MIME messages for display and downloading of attachments. I still haven't (yet) done hard-core testing of complex attachment names that Beatrix mentioned, but so far so good!

Basically, what I'm doing at the moment is downloading email from Office365 via IMAP using the MBS CURLS plugin, save it in an SQL database to keep it local so that each message never needs to be pulled more than once. The list of messages is presented to the user and when they select one, it is displayed in an HTMLViewer after being parsed using MimeEmailMBS.

I have the MBS plugins and use them for a lot of things--but unless I overlooked something (which is very possible given how little sleep I'm running on right now!), there's not something there that can act as MIME mail viewer in a web app running on a Windows server? Maybe in a native Windows app?

I'm using MBS Curl for pulling messages down via IMAP--it's just displaying them cleanly that I'm having problems with (all the various MIME parts and attachments). Christian, what do you mean by "parsely NUG emails?"

Parsing emails is a lot of interpretation. The Chilkat plugin has a method to parse the simpler mails but this fails as soon are you get multipart emails. I haven't looked at the CURL plugin from MBS in depth. A spot check showed that it couldn't parse the more complicated attachment names a while ago. IMO the only option for commercial software is the Chilkat plugin.

I have a home grown parser that catches most of the more complex stuff. I need to redo this with the Chilkat plugin in the next months. Wanted to make this open-source. But I need to finish the 64bit version of my software first.

Beatrix, you said "...the only option for commercial software is the Chilkat plugin" right after you say "The Chilkat plugin...fails as soon as you get multipart emails." Those two statements seem contradictory to me? Also, can you give an example of "complicated attachment names" that cause problems for MBS? I'm dealing primarily with multi-part emails (lots of attachments and embedded images and stuff, so it sounds like neither plugin will be smooth sailing :(

Christian, thanks for the link--I had overlooked some of those functions and the sample Email Viewer, so I look forward to trying them out tomorrow!

There is a function in the Chilkat plugin for parsing messages. This got me about 90% of my test mails with simple structures. There are more functions to take the message apart and iterate through the parts. Which is quite a bit of work to get right.

I'm not at home so I don't have the code in front of me. You can have attachment names in multiple rows like:

attachmentsomethingcontinuation character + attachment end

Combine this with encoding in the form of ?utf8? and you can get pretty complex stuff. As far as I remember the CURL stuff didn't support this at all.

Christian, I was finally able to test out the Email Viewer sample project that's included with the MBS plugins and based on my preliminary testing, it looks like it works fine for parsing out MIME messages for display and downloading of attachments. I still haven't (yet) done hard-core testing of complex attachment names that Beatrix mentioned, but so far so good!

Basically, what I'm doing at the moment is downloading email from Office365 via IMAP using the MBS CURLS plugin, save it in an SQL database to keep it local so that each message never needs to be pulled more than once. The list of messages is presented to the user and when they select one, it is displayed in an HTMLViewer after being parsed using MimeEmailMBS.