I'm writing some fairly unremarkable php code to retrieve email via IMAP
from a high load server.
My pseudo-code so far:
imap_open(..)
get_message_ids(..)
foreach message_id {
$header_info = imap_headerinfo(..)
$header = imap_fetchheader(..) // I need full headers
$structure = imap_fetchstructure(..)
foreach($structure->parts as $part)
get_part();
}
imap_headerinfo()
, imap_fetchheader()
and imap_fetchstructure()
all parse the email header.
Is the email header downloaded separately each time or is it cached?
If there is no caching, I'd rather just download the raw header once with imap_fetchheader()
and parse it with user code.