[Gambas-user] Problems reading pdf attachment using pop3 client
bill-lancaster
bill-lancaster at ...2231...
Sat Nov 30 13:14:20 CET 2013
Some further information.
If I download emails containing pdf files using .Message.ToString() and save
the email to file then try to decode the attachment with-:
Dim hMimeMessage As MimeMessage
Dim hMimePart As MimePart
Dim sTemp As String
Dialog.Title = "Select a text file"
If Dialog.OpenFile() Then Return
sTemp = File.Load(Dialog.Path)
hMimeMessage = New MimeMessage(sTemp)
For Each hMimePart In hMimeMessage.Part
If hMimePart.Disposition = "attachment" Then
File.Save(User.Home &/ "New Folder" &/ hMimePart.FileName,
Mime.Decode(sTemp, hMimePart.ContentEncoding))
Endif
Next
The saved file is unreadable.
kmail however can open the saved email and displays the attachment OK.
BTW I'm using Gambas 3.5
--
View this message in context: http://gambas.8142.n7.nabble.com/Problems-reading-pdf-attachment-using-pop3-client-tp44464p44465.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list