I've got a set of arrays of string from imap_fetchstructure. But I can't extract the string out of the set. I need the value of [filePath] so I've silly tried
echo [attachments:protected][filePath];
And it doesn't work at all. I'm so new to this kind of array... This is the sample of an array set.
By the way these lines are getting from this:
$mailStructure = imap_fetchstructure($this->getImapStream(), $mailId, FT_UID);
Which is $this->getImapStream() comes from a class ImapMailbox.php
IncomingMail Object (
[id] => 2687
[date] => 2014-08-07 16:53:11
[subject] => test attc
[fromName] => Hello Kitty
[fromAddress] => [email protected]
[to] => Array (
[[email protected]] => sales
)
[toString] => sales
[cc] => Array ( )
[replyTo] => Array (
[[email protected]] => Hello Kitty
)
[textPlain] => testing for attachment
[textHtml] => testing for attachment
[attachments:protected] => Array (
[487540462265330294] => IncomingMailAttachment Object (
[id] => 487540462265330294
[name] => america_support_taks.jpg
[filePath] => /home/hellokitty/domains/hellokitty.com/public_html/email/inc/2687_487540462265330294_america_support_taks.jpg
)
)
)
imap_fetchstructure, compare to the return description in the manual.$incomingMail->attachements['487540462265330294']->filePathImapMailbox.phpwhich I already update the source. Please follow. Thank you.