Romych
Guest
отделить аттач от тела письма
Ребят вопрос есть. есть письмо с аттачем
нужно отделить аттач от тела письма а я нинаю как
сматрел по форуму, упоминались функции imap_fetchststructure() b fetch_body()
попробовал
$test = imap_fetchstructure($mbox, $id);
var_dump($test);
результат:
object(stdClass)(11) { ["type"]=> int(1) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=> string(5) "MIXED" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(8) "BOUNDARY" ["value"]=> string(26) "----------1C12D1C933545C90" } } ["parts"]=> array(2) { [0]=> object(stdClass)(12) { ["type"]=> int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=> string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["lines"]=> int(6) ["bytes"]=> int(99) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(7) "CHARSET" ["value"]=> string(8) "us-ascii" } } } [1]=> object(stdClass)(13) { ["type"]=> int(3) ["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=> string(6) "MSWORD" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["bytes"]=> int(27364) ["ifdisposition"]=> int(1) ["disposition"]=> string(10) "ATTACHMENT" ["ifdparameters"]=> int(1) ["dparameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(8) "FILENAME" ["value"]=> string(43) "=?Windows-1251?Q?=C3=E5=EB=EB=E5=F0=2Edoc?=" } } ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(4) "NAME" ["value"]=> string(43) "=?Windows-1251?Q?=C3=E5=EB=EB=E5=F0=2Edoc?=" } } } } }
все замечательно только не знаю что дальше то сделать
может падскажете?
-~{}~ 08.10.04 10:03:
всем спасиба сам разабрался 
Ребят вопрос есть. есть письмо с аттачем
нужно отделить аттач от тела письма а я нинаю как
сматрел по форуму, упоминались функции imap_fetchststructure() b fetch_body()
попробовал
$test = imap_fetchstructure($mbox, $id);
var_dump($test);
результат:
object(stdClass)(11) { ["type"]=> int(1) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=> string(5) "MIXED" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(8) "BOUNDARY" ["value"]=> string(26) "----------1C12D1C933545C90" } } ["parts"]=> array(2) { [0]=> object(stdClass)(12) { ["type"]=> int(0) ["encoding"]=> int(0) ["ifsubtype"]=> int(1) ["subtype"]=> string(5) "PLAIN" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["lines"]=> int(6) ["bytes"]=> int(99) ["ifdisposition"]=> int(0) ["ifdparameters"]=> int(0) ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(7) "CHARSET" ["value"]=> string(8) "us-ascii" } } } [1]=> object(stdClass)(13) { ["type"]=> int(3) ["encoding"]=> int(3) ["ifsubtype"]=> int(1) ["subtype"]=> string(6) "MSWORD" ["ifdescription"]=> int(0) ["ifid"]=> int(0) ["bytes"]=> int(27364) ["ifdisposition"]=> int(1) ["disposition"]=> string(10) "ATTACHMENT" ["ifdparameters"]=> int(1) ["dparameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(8) "FILENAME" ["value"]=> string(43) "=?Windows-1251?Q?=C3=E5=EB=EB=E5=F0=2Edoc?=" } } ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)(2) { ["attribute"]=> string(4) "NAME" ["value"]=> string(43) "=?Windows-1251?Q?=C3=E5=EB=EB=E5=F0=2Edoc?=" } } } } }
все замечательно только не знаю что дальше то сделать

может падскажете?
-~{}~ 08.10.04 10:03:

