Grab value of mail headers

From: Date: Thu, 25 Jul 2002 03:47:57 +0000
Subject: Grab value of mail headers
Groups: php.general 
Request: Send a blank email to php-general+get-109410@lists.php.net to get a copy of this message
Hi Could someone please enlighten me on a good way to grab the value for a given mail header once I've fetched the entire headers to a string using php:s imap_fetchheader() function? For an example I would like to look for a header called List-Id which may look like this: List-Id: <php-general.lists.php.net> And grab the value - <php-general.lists.php.net> - into a variable to use later on in my script. Bonus points if you could tell me a way to parse the entire headers into something useful like a set of key, value pairs using the header name as key and the value as value. Tia, Nicklas

« previous php.general (#109410) next »