Save attachments POP3 problem with ct.DecodeData

Sep 11, 2014 at 9:24 AM
I have imported the dll in a vb.net project.
I need to download pop3 mail messages and save only the attachments on my disk (ex. order.txt).

I intercept the mail messages, but I can not save attachments.

Following your instruction below the example POP3 does not work. The method decodeData does not exist.
What can I do?

foreach (MailContent mg.Contents in ct)
{
   String filePath = "C: \ MyFolder \" + ct.ContentDisposition.FileName; 
   ct.DecodeData (filePath); 
} 
I save the email text and the content of the attachment in one file, with these instructions
but I need the attachment only with its name for example "order.txt". (Not the email text)
The instruciotn ct.FileName returns always "winmail.dat"

Dim ct As HigLabo.Mime.MimeContent
ms = New MemoryStream
data = ct.RawData
ms.Write (data, 0, data.Length)
ms.Seek (0, 0)
fs = New FileStream (filePath & "sct_rowdata.txt", FileMode.Create, FileAccess.Write)
ms.WriteTo (fs)
fs.Close ()
ms.Close ()

Can you please help me?

Thanks
Sep 11, 2014 at 9:54 AM
returns always "winmail.dat"
winmail.dat - Transport Neutral Encapsulation Format or TNEF is a proprietary email attachment format used by Microsoft Outlook and Microsoft Exchange Server.
Sep 11, 2014 at 10:27 AM
How can i retrive only the file attachement "order.txt" from the file "winmail.dat" ?
Sep 11, 2014 at 12:09 PM
You need decode "winmail.dat" :)
I ask two years ago, about this
https://higlabo.codeplex.com/discussions/348784