mailparse_msg_extract_part_file() does not support file-wrappers as it needs to be able to use seek() on the file.mailparse_msg_extract_part_file
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
mailparse_msg_extract_part_file
Референца за `function.mailparse-msg-extract-part-file.php` со подобрена типографија и навигација.
mailparse_msg_extract_part_file
(PECL mailparse >= 0.9.0)
mailparse_msg_extract_part_file — Extracts/decodes a message section
= NULL
$mimemail, mixed $filename, callable $callbackfunc = ?): stringExtracts/decodes a message section from the supplied filename.
The contents of the section will be decoded according to their transfer encoding - base64, quoted-printable and uuencoded text are supported.
Параметри
mimemail-
Валиден
MIMEresource, created with mailparse_msg_create(). filename- Can be a file name or a valid stream resource.
callbackfunc-
If set, this must be either a valid callback that will be passed the extracted section, or
nullto make this function return the extracted section. If not specified, the contents will be sent to "stdout".
Вратени вредности
Враќа callbackfunc не е null returns true на успешен исход.
Враќа callbackfunc е поставен на null, returns the extracted section as a string.
Патеката до PHP скриптата што треба да се провери. false при грешка.
Види Исто така
- mailparse_msg_extract_part() - Извлекува/декодира секција од порака
- mailparse_msg_extract_whole_part_file() Извлекува/декодира дел од пораката
Белешки од корисници 2 забелешки
Be aware of "corporate mails" or users who do not understand character encoding too deeply (or do not care). You may (as we did) face mail where the whole mail body is encoded used i.e. Latin2 (and iso-8859-2 is given in multipart's charset header) but at the same time the body also contains text footer with UTF-8 characters in it... Yes, fu*g Microsoft Exchange V6.5 frontent will show that fine on the screen, but if when receive it:
mailparse_msg_extract_part_file() - filter conversion failed. Input message is probably incorrectly encoded in ....
so be extra careful and deal with all the possible errors to avoid mail loss.