iSAttachement true, but no data from GetAttachedContents(pop3Message)

Sep 23, 2011 at 10:56 PM

Hello, I sent to you ( two e-mails with a doubt about how to get the attachement when the parameter IsAttachement is true, but the method GetAttachedContents(pop3Message) return no list... I gave to you the Pop3 Server address, login and e-mail case you want to see the case, at the first tree e-mails have the problem.

I am processing the Pop3 e-mails and I noted that the problem sent to you before (button in this e-mail), the e-mails (From Philips customer), despite of is not showing the icon “attached” in the Web browser, when I process the message from Pop3, the Pop3Message.IsAttachment parameter is TRUE.


If I use the statement:


listContent = Pop3Message.GetAttachedContents(pop3Message); // or Pop3Message.GetAllContents(pop3Message))...


its always returns for “listContent” with Count= 0, but if I to use then following statement:


if(pop3Message.IsAttachment) {   string xml = MailParser.DecodeFromMailBody(pop3Message.BodyData, pop3Message.ContentTransferEncoding, Encoding.UTF8); ...}

Its work!!.

How could I get the message from method Pop3Message.GetXXX ??

Sep 26, 2011 at 2:16 PM

Check IsMultiPart property (or MultiPartBoundary property is empty or null) of Pop3Message class.
Pop3Message pop3Message = ...///getPop3Message from Pop3Client object.
if (pop3Message.IsAttachment == true && pop3Message.IsMultipart == false)
     String filename = pop3Message.ContentDisposition.FileName;
     String xml = pop3Message.BodyText;
     var listContents = Pop3Message.GetAttachedContents(pop3Message);
I plan to redesign this api more intuitive.
But Pop3Message and Pop3Content is different object.
Pretty nasty.
It may be no good idea to resolve this issue.

Sep 28, 2011 at 12:32 AM

I found the problem and modify library.
You can get text data BodyText property.
Check the latest version!!