From: stekkel Date: Fri, 5 Jul 2002 13:15:55 +0000 (+0000) Subject: Added search for "x-mailer" and "disposition notification to" and add it to X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=b6721590aa18ee9937bc9efad060402e15276ee7 Added search for "x-mailer" and "disposition notification to" and add it to the message header. Now we don't need the extra imap-calls to get this information. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3042 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_parse.php b/functions/imap_parse.php index 36284596..a4b08fd0 100644 --- a/functions/imap_parse.php +++ b/functions/imap_parse.php @@ -126,7 +126,7 @@ function sqimap_parse_RFC822Header ($read, $hdr) { break; case 'c': /* Cc */ if (strtolower(substr($line, 0, 3)) == "cc:") { - $hdr->cc = sqimap_parse_address(trim(substr($line, 9, strlen($line) - 10)), true); + $hdr->cc = sqimap_parse_address(trim(substr($line, 3, strlen($line) - 4)), true); } $i++; break; @@ -166,7 +166,7 @@ function sqimap_parse_RFC822Header ($read, $hdr) { case 'i': /* Disposition-Notification-To */ if (strtolower(substr($line, 0, 28)) == "disposition-notification-to:") { $dnt = trim(substr($read[$i], 28)); - $hdr->disposition = sqimap_parse_address($dnt, false); + $hdr->dnt = sqimap_parse_address($dnt, false); } $i++; break; @@ -214,9 +214,11 @@ function sqimap_parse_RFC822Header ($read, $hdr) { break; case 'x': /* X-PRIORITY */ - if (strtolower(substr($line, 0, 11)) == "x-priority:") { + if (strtolower(substr($line, 0, 11)) == 'x-priority:') { $hdr->priority = trim(substr($line, 11)); - } + } else if (strtolower(substr($line,0,9)) == 'x-mailer:') { + $hdr->xmailer = trim(substr($line, 9)); + } $i++; break; default: