+1 vote
by (270 points)

When retrieving Emails from a certain sender to an IBM Domino server, the Email Body is returned as an Attachment of the MailMessage Class. The Email Body Attachment is named something like ATT00001.txt.

When I view the original Email using the IBM Notes Web Mail UI, I can see that the Email has a single attachment which is a PDF file and no other attachments.

What would cause the Email Body to be returned in this manner.

The MailMessage.HasBodyHTML and the MailMessage.HasBodyText both return False.

Thanks,
Lance

Applies to: Rebex Secure Mail
by (58.9k points)
Could you please download the mail using the Imap.GetMessage (this is important - don't download into MailMessage/MimeMessage and then save) method and then pack the email into a zip archive and send it back to us for analysis? This way we will see how the original email looks like on the server and help you resolve this issue.

Thanks,
Tomas
by (58.9k points)
Any news on this? Was this issue resolved by applying the new version of Rebex Secure Mail as suggested in my below answer?

1 Answer

0 votes
by (58.9k points)

Thank you for sending us the problematic EML file.

I tested loading the original email into the MailMessage class and actually I was unable to reproduce the problem that you described.

With the code below:

MailMessage mail = new MailMessage ();
mail.Load ("email.eml");

Console.WriteLine (mail.HasBodyText);
Console.WriteLine (mail.Attachments.Count);
    Console.WriteLine (mail.BodyText);

mail.Save("email-resaved.eml");

the email parses just correctly. The HasBodyText property is set to 'true' and the Attachments.Count is "1" as it should be (only the pdf was parsed as attachment). I do not see the ATT00001.txt attachment popping is as you described.

Could you please try to download the email with the latest version of Rebex Secure Mail (e.g. 2015R4.1)? If you still experience the issue with the newest version, please send us a code repro so that we are able to reproduce this issue.

...