I'm using the Chilkat library via declares in Xojo. Getting the headers for a mail works okay, but the function GetMime only gives me the headers, too.
Declare for Header: Declare Function getHeaderData lib ImapLibLocation selector "Header" (obj as Ptr) as CFStringRef Return getHeaderData(self)
Declare for Body: Declare Function getBodyData lib ImapLibLocation selector "GetMime" (obj as Ptr) as CFStringRef Return getBodyData(self)
Is this a bug? I'm using version 18.104.22.168 of the library.
Check to see if you downloaded headers-only.
answered Aug 24 '15 at 08:07
Thanks! I think I've got it: In the code below I'm using FetchHeaders, which is obviously not a good idea. So I'd better use FetchSequenceAsMime or FetchSingleAsMime.
'get pointer to MessageSet declare Function searchAll lib ImapLibLocation selector "Search:bUid:" (obj as Ptr, refname as CFStringRef, fetchUuids as Boolean) as Ptr dim p as Ptr = searchAll(self, "ALL", true) dim MessageSetPointer as Ptr = searchAll(self, "NOT DELETED", doTrash) if MessageSetPointer = nil then globals.theErrorLog.LogItem CurrentMethodName + " messagesetpointer is nil " + getLastErrorCko globals.theErrorLog.DialogErrorProceed theError Return 0 end if MessageSet = new MessageSetCko(MessageSetPointer, False)
'now make bundle from MessageSet declare Function getBundle lib ImapLibLocation selector "FetchHeaders:" (obj as Ptr, set as Ptr) as Ptr dim EmailBundlePointer as Ptr = getBundle(self, MessageSet) EmailBundle = new EmailBundleCko(EmailBundlePointer, False) if EmailBundle = nil then globals.theErrorLog.LogItem CurrentMethodName + " EmailBundle is nil " + getLastErrorCko globals.theErrorLog.DialogErrorProceed theError Return 0 end if
NoOfMails = EmailBundle.getCount
Mit freundlichen Grüßen/Regards
http://www.mothsoftware.com Mail Archiver X: The email archiving solution for professionals
answered Aug 24 '15 at 08:56