SunshinePHP Developer Conference 2015

imap_header

(PHP 4, PHP 5)

imap_headerAlias von imap_headerinfo()

Beschreibung

Diese Funktion ist ein Alias für: imap_headerinfo().

add a note add a note

User Contributed Notes 2 notes

up
2
jeremy at caramiel dot com
6 years ago
Here is a clean way to decode encoded imap headers that will work in all cases :

function fix_text($str)
{
    $subject = '';
    $subject_array = imap_mime_header_decode($str);

    foreach ($subject_array AS $obj)
        $subject .= rtrim($obj->text, "\t");

    return $subject;
}
up
0
stepotronic at nimbleminds dot net
6 years ago
At jeremy at caramiel dot com:
You are wrong, since it will just work if the encoding of the characters is also used in the current context.
There is a reason why it comes with the charset :)

There are way better solutions with imap_mime_header_decode
To Top