They seem to be sending fine to me. Is imap_fetchheader() returning
anything? Paste what it is sending back to you.

Also, you can try the following...

------------------------------------------
// get imap_fetch header and put single lines into array
    $header = explode("\n", imap_fetchheader($imap, $msg));

    // browse array for additional headers
    if (is_array($header) && count($header)) {
        $head = array();
        foreach($header as $line) {
            // is line with additional header?
            if (eregi("^X-", $line)) {
                // separate name and value
                eregi("^([^:]*): (.*)", $line, $arg);
                $head[$arg[1]] = $arg[2];
            }
        }
    }else{
        echo $head;
    }
------------------------------------------

The $head variable can be used to get each twitter variable like so...
$head['TwitterDirectMessageID'] or whatever the header without 'X-'.

Hope that helps!
-James

Reply via email to