I spend lot of time find out how I can detect messages with
different priorities. When I read users notes I remember
function imap_fetchheader which show header of message
and additional headers too. Because I'm so lazy to work with
regular expressions I required my frend for writing code
- thanx Znouza.
And there is... :)
<?php
$connection = @imap_open("{localhost:143/imap}INBOX", "your_username", "your_password");
$header = explode("\n", imap_fetchheader($connection, 1));
if (is_array($header) && count($header)) {
$head = array();
foreach($header as $line) {
if (eregi("^X-", $line)) {
eregi("^([^:]*): (.*)", $line, $arg);
$head[$arg[1]] = $arg[2];
}
}
}
?>