Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<imap_rfc822_parse_adrlistimap_rfc822_write_address>
^IMAP FunctionsLast updated: Mon, 26 Oct 2026

imap_rfc822_parse_headers

(PHP 4, PHP 5, PHP 7, PHP 8)

imap_rfc822_parse_headers — Parse mail headers from a string

Description

function imap_rfc822_parse_headers(string $headers, string $default_hostname = "UNKNOWN"): stdClass

Gets an object of various header elements, similar to imap_header().

Parameters

headers

The parsed headers data

default_hostname

The default host name

Return Values

Returns an object similar to the one returned by imap_header(), except for the flags and other properties that come from the IMAP server.

See Also


<imap_rfc822_parse_adrlistimap_rfc822_write_address>
^IMAP FunctionsLast updated: Mon, 26 Oct 2026