0 votes
by (370 points)
edited

Hi, i'm using rebex 1.0.4086

In some cases when i try to read a mail using imap class the content of the attached file seems to be strange. The curios things is that if i read the mail from the imap folder i have the problem, instead,if i save the mail using outlook (save as .msg) in a folder and then i read the message using the method load of the class MailMessage i read the attach well.

Other things: After reading the mail from imap i save the mail in a file. I noticed that the content of the saved file it's different from the original. The attached content seems to be inside a begin end keys.

Here below the methods used to save the mail:

MemoryStream ms = new MemoryStream();
m_Message.Save(ms, MailFormat.OutlookMsg);
byte [] b = ms.GetBuffer();

This is the content of the attached file:

begin 600 HUR_ALLBRATMITASI00342013.csv
M4@I2+%-%3D1%4BQ214-)4$E%3E0L4T51545.0T4@3D\L5$A215-(3TQ$+$1!
M5$4@04Y$(%1)344@3T8@04Y!3%E325,L1$%412!!3D0@5$E-12!/1B!215!/
M4E0*4@I(+$)2051-+$E405-)+#`P,S0R,#$S+#4P+#(P,3,P,C`T,#DP,#`T
M+#(P,3,P,C`T,#DP,#`T"E(*4@I2+%1/5$%,($Y532!/1B!625-)5$]24R`R
M,BP@3U9%4B!42%)%4TA/3$0@,#L@5$]404P@3E5-($]&($5614Y44R`T,@I2
M"E(*4BQ"14=)3DY)3D<@3T8@5$A%($]"4T525D%424].(%!%4DE/1"Q%3D0@
M3T8@5$A%($]"4T525D%424].(%!%4DE/1`I2"DXL,C`Q,S`R,#,L,C`Q,S`R
M,#,*4@I2+$5.1"!/1B!215!/4E0*4@I2+$Y/3D4@3T8@5$A%($E-4TE3($58
M0T5%1$5$(%1(12!!1U)%140@5$A215-(3TQ$($].(%1(25,@4$Q-3@I2"E0L
#,3@*
`
end

Can you help me?

Applies to: Rebex Secure Mail
by (70.2k points)
edited

Is it possible for you to send us the original mail received from IMAP server for investigation? It can be retrieved like this:

m_Imap.GetMessage(messPartial.UniqueId, @"C:\temp\mail.eml");

Please send it to support@rebex.net as compressed attachment to prevent it from modifying by transport layer.

Please note that you are able to read attachment correctly from .msg file, because MS Outlook probably transformed the attachment from UUENCODE to plain text.

2 Answers

0 votes
by (70.2k points)
edited
 
Best answer

This is fixed from version 2013 R1 (build number 4959) - we added support for attachments with Content-Transfer-Encoding: uuencode.

0 votes
by (370 points)
edited

Hi, i understood that the attached file in the message received is uuencoded.

The questions are: doing the following code:

MailMessage mess = m_Imap.GetMailMessage(messPartial.UniqueId);
StreamReader reader = new StreamReader(
    mess.Attachments[IdxAttachment].GetContentStream());
buff = reader.ReadToEnd();
  1. how to understand that the attachment is in uuencoded format? How to convert it?
  2. if i save the message (using method save) after reopening in outlook, the attach file appear as only text (uuencoded).
by (70.2k points)
edited

Actually, the component supports UUENCODE, but the mail you encountered seems to be an invalid UUENCODE message (an UUENCODE attachment of a MIME message should be specified within its body, not as a single attachment). Can you please send the original MIME message to support@rebex.net for investigation?

...