mail_decode_text()
Usage
mail_decode_text(text)
Description
Decode “unstructured” headers, that is, headers that are defined as ‘*text’ as per RFC 822.
The string is decoded using the algorithm specified in RFC 2047, Section 6.1. If the charset-conversion fails for any sequence, it is returned as-is.
If the String is not an RFC 2047 style encoded header, it is also returned as-is
Example
${mail_decode_text('=?utf-8?Q?h=C3=A4llo?=')}
results in
hällo