The library ipworks provides some methods fetching the textmessage.
In the documentation I don't find how to read the attachements via ipworks library using imaps.
The library ipworks provides some methods fetching the textmessage.
In the documentation I don't find how to read the attachements via ipworks library using imaps.
Copyright © 2021 Jogjafile Inc.
I work for /n software and we came across your question here. Based on the tags for this question it looks like you are probably using our .NET Edition and C# code so I will use C# code for my example.
Retrieving attachments from the Imaps component requires that you use the MessageParts property. This property contains a collection of the individual MIME parts from the downloaded email message. Typically the first two parts are going to be the HTML body of the email message (if applicable) and the plain-text body of the email message. Any attachments will be in the remaining MIME parts. You can use some code similar to the following to retrieve the attachments from the selected email message:
Note that it is also possible that the individual MIME parts will be base64 encoded. If you wish to have our component automatically decode these parts then you will need to set the "AutoDecodeParts" property to "true". This should be done prior to calling the FetchMessageInfo method. Please see the example below:
There is also a possibility that the email message will contain nested MIME structures. This is a more complicated case which requires a recursive approach to deconstruct the nested MIME structures. Our MIME component (available in our IP*Works and IP*Works S/MIME products) can be very helpful for this.
If you need an example in another language, an example for handling nested MIME structures, or if you have any other questions, please feel free to contact us at [email protected].