replacement for emailMessage class

Hi… I continually am running into problems with the emailMessage class… it does not properly parse and decode the message…

Has anyone written their own class that works?


Can you put some bugs in Feedback, so they may be fixed over time?

There are already numerous reports going back to 2008… including 1077, 28582, 11318, 7119 & 2131.

I checked them and I think most of them are actually feature requests as the EMailMessage class never was a full solution. Just a simple way to handle emails for automatic processing.

When I look at the documentation for emailMessage.BodyPlainText and see “The body text of the email as plain text.”, I guess I do not expect to see a base64 encoded string.

It is one thing to not handle some fairly rare situation… but this seems pretty basic even if you accept that the class is not a “full solution”… which I do not.

I was actually hoping that you would have a much better MBS class.

sorry, no. But I think some people wrote email clients with Xojo so they may have a good idea about this.

Where are you seeing that? You’re saying that you set BodyPlainText and later it shows as base64? Or are you receiving an email that should have a plain text part (not all do) and it’s garbled? You may have to check the headers to see what’s included in the message.

IIRC there was the Zymal project , an open source mail client written in REALbasic back then.

The zymail source code is available at

Hi Tim…

This is in a message I receive via a POP3Socket.MessageReceived event.

There is no Content-Transfer-Encoding in the message headers.

The Content-Type is multipart/alternative and the first “part” which is the body does have a Content-Transfer-Encoding = base64 “sub header”… but the class ignores that and does not decode it to plain text… so the message.BodyPlainText property is base64 encoded… I have the same problem with the next “part” which is an html version.

If you are interested, I can send you a copy of the rawSource… but it is a little large to post here.

At this point, I have to go back to the rawSource, find that part, and its “sub-header” to determine if it needs decoding or not…

But that is only 1 hack I have had to add… There are also problems if there is no body but there is a text file attachment… and emailAttachment.saveToFile fails in some cases when it seems not to be able to find a ContentEncoding for that attachment.

It would be a lot easier to track down these problems and fix them if we were given the source code for the class.


I think this is Joe’s old project that he stopped working on a long time ago… and it seems that the source is no longer posted.


[quote=48741:@James Meyer]Eric…

I think this is Joe’s old project that he stopped working on a long time ago… and it seems that the source is no longer posted.


It’s still there… but needed to be updated for changes in the language and framework