OpenPop Attachment issue, messagepart ContentDisposition is null

  • Thread starter Thread starter KBid
  • Start date Start date
K

KBid

Guest
I have a issue reading attachments from e-mails. I have to read and save only attachments from e-mails. I first used 'IsAttachment' to check if the messagepart is a attachment. The problem with that was that i also got inline images, like inline logo's as attachment. So i changed that check to:

if (!messagePart.ContentDisposition == null || messagePart.ContentDisposition.Inline == false)


That worked always, but now i have a e-mail with one pdf file as attachment, but the messagePart.ContentDisposition is null? so my code just ignores that attachment.

How to fix this?

Continue reading...
 
Back
Top