iconv_mime_encode
iconv_mime_encode
Composes a MIME header field
**iconv_mime_encode** string $field_name string $field_value array $options
Composes and returns a string that represents a valid header field, which looks like the following:
In the above example, "Subject" is the field name and the portion that begins with "=?ISO-8859-1?..." is the field value. `MIME````php Subject: =?ISO-8859-1?Q?Pr=FCfung_f=FCr?= Entwerfen von einer MIME kopfzeile
`field_name`The field name.
`field_value`The field value.
`options`
You can control the behaviour of
by specifying an associative array that contains configuration items
to the optional third parameter .
The items supported by are
listed below. Note that item names are treated case-sensitive.
`iconv_mime_encode``options``iconv_mime_encode`
Returns an encoded field on success,
or false if an error occurs during the encoding.
`MIME`
**Voorbeeld: example**
```php
<?php
$preferences = array(
"input-charset" => "ISO-8859-1",
"output-charset" => "UTF-8",
"line-length" => 76,
"line-break-chars" => "\n"
);
$preferences["scheme"] = "Q";
// This yields "Subject: =?UTF-8?Q?Pr=C3=BCfung=20Pr=C3=BCfung?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
$preferences["scheme"] = "B";
// This yields "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
?>
imap_binary``mb_encode_mimeheader``imap_8bit``quoted_printable_encode