
Pontus Lundin - 2013-01-18 00:02:24 -
In reply to message 13 from Manuel Lemos
Manuel, so i made ensure the var_dump didn't get escaped by
ob_start();
var_dump($var);
$result = ob_get_clean();
return $result;
Can you please help me understand how to get the path in this array where BodyFile for the message is ?
I mean just doing
foreach($decoded[0]['Parts'] as $part){
thePath=$part['BodyFile'];
}
will only get the attchment path.I dont understand, is it nested when attachment is included? If i just send a plain text message without attachment i can get the BodyFile in the loop above.
Here is the dump of a message which include text and attachment. So we can see, like you said, the BodyFile is indeed included..but how to get all paths (bodyFile)?
array(2) {
[0]=>
array(3) {
["Headers"]=>
array(1) {
["content-type:"]=>
string(60) "multipart/alternative; boundary=14dae9399bd92dddb204d383e69b"
}
["Parts"]=>
array(2) {
[0]=>
array(7) {
["Headers"]=>
array(1) {
["content-type:"]=>
string(30) "text/plain; charset=ISO-8859-1"
}
["Parts"]=>
array(0) {
}
["Position"]=>
int(1822)
["namn"]=>
string(82) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/15693364391"
["BodyFile"]=>
string(82) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/15693364391"
["BodyPart"]=>
int(1)
["BodyLength"]=>
int(634)
}
[1]=>
array(7) {
["Headers"]=>
array(2) {
["content-type:"]=>
string(29) "text/html; charset=ISO-8859-1"
["content-transfer-encoding:"]=>
string(16) "quoted-printable"
}
["Parts"]=>
array(0) {
}
["Position"]=>
int(2533)
["namn"]=>
string(83) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/125115980227"
["BodyFile"]=>
string(83) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/125115980227"
["BodyPart"]=>
int(2)
["BodyLength"]=>
int(1390)
}
}
["Position"]=>
int(1715)
}
[1]=>
array(9) {
["Headers"]=>
array(4) {
["content-type:"]=>
string(33) "image/png; name="icon16_info.png""
["content-disposition:"]=>
string(38) "attachment; filename="icon16_info.png""
["content-transfer-encoding:"]=>
string(6) "base64"
["x-attachment-id:"]=>
string(11) "f_hc2i0ehc0"
}
["Parts"]=>
array(0) {
}
["Position"]=>
int(4126)
["FileName"]=>
string(15) "icon16_info.png"
["FileDisposition"]=>
string(10) "attachment"
["namn"]=>
string(95) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/711240425icon16_info.png"
["BodyFile"]=>
string(95) "/var/www/vhosts/domain/httpdocs/cemupload/2013/01/17/711240425icon16_info.png"
["BodyPart"]=>
int(3)
["BodyLength"]=>
int(908)
}
}