login about faq

Hi,

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 9.5.0.48 of the library.

Regards

Beatrix Willius

asked Aug 23 '15 at 10:00

bwill's gravatar image

bwill
213

edited Aug 23 '15 at 10:01


Check to see if you downloaded headers-only.

link

answered Aug 24 '15 at 08:07

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

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

Return NoOfMails

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com Mail Archiver X: The email archiving solution for professionals

link

answered Aug 24 '15 at 08:56

bwill's gravatar image

bwill
213

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×174

Asked: Aug 23 '15 at 10:00

Seen: 968 times

Last updated: Aug 24 '15 at 08:56

powered by OSQA