librelist archives

« back to archive

getting message headers

getting message headers

From:
Rick Gigger
Date:
2012-08-28 @ 13:16
I'm reading API docs for CTCoreMessage on 
http://libmailcore.com/api/Classes/CTCoreMessage.html

I don't see anything about how to get the message headers. Do I need to 
call [message rfc822] and then parse the headers myself? Is there a way to
get the headers without downloading the whole message?

Also when calling body, htmlBody, getAttachments, and fetchBodyStructure 
does it always download the entire message or is IMAP able to download 
only the parts that you request?

Rick

Re: [mailcore] getting message headers

From:
Matt Ronge
Date:
2012-08-31 @ 18:03
On Aug 28, 2012, at 8:16 AM, Rick Gigger <rgigger@gmail.com> wrote:

> I'm reading API docs for CTCoreMessage on 
http://libmailcore.com/api/Classes/CTCoreMessage.html
> 
> I don't see anything about how to get the message headers. Do I need to 
call [message rfc822] and then parse the headers myself? Is there a way to
get the headers without downloading the whole message?

Many of the headers are already parsed out, which ones in particular are 
you looking for?
--
Matt Ronge
mronge@mronge.com
iOS Developer & Consultant
Central Atomics Inc.

Re: [mailcore] getting message headers

From:
Rick Gigger
Date:
2012-09-01 @ 08:02
Well I was looking for inReplyTo but I already added support for that. It 
would be nice to be able to fetch just the header section though even if 
they aren't parsed. But it would be even nicer to be able to get a data 
structure with all the parsed headers back.

It should be possible to fetch them through the IMAP command FETCH BODY 
the same as any other section. Do you know if the currently accessible 
headers are coming from a FETCH ENVELOPE or from FETCH BODY HEADERS? I 
assume FETCH ENVELOPE would be faster and that fetching the full headers 
separately would require another request.

On Aug 31, 2012, at 12:03 PM, Matt Ronge <mronge@mronge.com> wrote:

> 
> On Aug 28, 2012, at 8:16 AM, Rick Gigger <rgigger@gmail.com> wrote:
> 
>> I'm reading API docs for CTCoreMessage on 
http://libmailcore.com/api/Classes/CTCoreMessage.html
>> 
>> I don't see anything about how to get the message headers. Do I need to
call [message rfc822] and then parse the headers myself? Is there a way to
get the headers without downloading the whole message?
> 
> Many of the headers are already parsed out, which ones in particular are
you looking for?
> --
> Matt Ronge
> mronge@mronge.com
> iOS Developer & Consultant
> Central Atomics Inc.
> 

Re: [mailcore] getting message headers

From:
Matt Ronge
Date:
2012-09-02 @ 23:45

On Sep 1, 2012, at 3:02 AM, Rick Gigger <rgigger@gmail.com> wrote:

> Well I was looking for inReplyTo but I already added support for that. 
It would be nice to be able to fetch just the header section though even 
if they aren't parsed. But it would be even nicer to be able to get a data
structure with all the parsed headers back.
> 
> It should be possible to fetch them through the IMAP command FETCH BODY 
the same as any other section. Do you know if the currently accessible 
headers are coming from a FETCH ENVELOPE or from FETCH BODY HEADERS? I 
assume FETCH ENVELOPE would be faster and that fetching the full headers 
separately would require another request.

Hi Rick,

I believe they are coming from a FETCH ENVELOPE. To double check call 
MailCoreEnableLogging() and you'll see the IMAP commands sent and received
in the Xcode console.

--
Matt Ronge
mronge@mronge.com
iOS Developer & Consultant
Central Atomics Inc.