0 votes
by (280 points)

I am getting the following error when I am attempting to download a mail message. This is only occurring for a particular sender to the email account that I am accessing.

I am using version 2.0.5700.0 of the Rebex library.

The below error message occurs when this line of code executes.

Dim message As MailMessage = client.GetMailMessage(imapMsg.UniqueId)

Error message returned.

Rebex.Mail.MailException: Invalid UUEncode line 'M/P- BMIME-Version: 1.0'. Data length is not a multiple of 4.
at Rebex.Mail.YBB.C(Stream A, String B, Int32 C, Int32 D)
at Rebex.Mail.YBB.B(Stream A, String B)
at Rebex.Mail.YBB.A(MimeEntity A, Boolean B)
at Rebex.Mail.MailMessage.YD(MimeEntity A)
at Rebex.Mail.MailMessage.UD(MimeEntity A)
at Rebex.Mail.MailMessage.TD(MimeMessage A)
at Rebex.Mail.MailMessage..ctor(MimeMessage message)
at Rebex.Net.Imap.AW(String A)
at Rebex.Net.Imap.GetMailMessage(String uniqueId)
at ExchangeEMailDownload_Service.modMain.GetEMailMessages() in C:\Source\EMail Download Service\Modules\modMain.vb:line 429

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (148k points)
edited by

"M/P- BMIME-Version: 1.0" - this looks like "MIME-Version: 1.0" MIME header concatenated with some other data. I guess the message structure is somewhat strange - it is quite likely it doesn't really contain any UUEncoded attachments, although the strange body structure made the parser detect it as one.

Would it be possible to open the message in notepad or other simple text editor and copy&paste the part of the message around M/P- BMIME-Version: 1.0 (or mail it to support@rebex.net in a ZIP file)? That should make it possible to tell what exactly is going on and solve it.

Update: It looks like the message actually is using UUEncode, but the structure seems strange... There are lots of spaces in middle of attachment data and some lines are longer than others... I am afraid the message is so badly broken that it's unparsable. Try reporting this to the message originators - they may be able to do something about it. However, I get "Invalid UUEncode line" MailException when parsing the message - this is different than the error you reported (perhapos it's a different message?), but it's still caused by broken UUEncoded data.

by (280 points)
I have Emailed the Message Source text to support@rebex.net.  It looks like the PDF file attachment is embedded within the body of the message.
...