Sorry but that doesn't work. I believe you mean imap_header(), not imap_headers(), but then still the imap_header() function returns an object, not an array that can be imploded.
Instead I tried:
----------------
$header = (array) imap_header($imap, $msgid);
$header = implode("\r\n", $header);
and i got something like:
----------------
Fri, 12 Mar 2010 20:40:27 +0100
Fri, 12 Mar 2010 20:40:27 +0100
Freiexemplare etc.
Freiexemplare etc.
Thomas Trinkaus
Array
Reinhard Friedrich
Array
...
----------------
But as far as i know an email source should begin with "From" and look something like
-----------------
From - Sat Mar 13 15:37:25 2010
X-Account-Key: account5
X-UIDL: UID344-1254383253
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Return-Path: <
[email protected]>
...
------------------
Where's the mistake, what have i done wrong?