
t withers - 2015-03-26 18:43:53 -
In reply to message 1 from Harry Siereveld
Been awhile since I have used this or worked on this, so I am going off what I gathered reading the docs.
What I would do is something like this:
foreach($messages as $message){
if($message->hasAttachments()){
foreach($message->attachments as $id=>$attachment){
echo $id."-".$attachment->data->parameters[0]->value;
}
}
}
To download an attachment, you would need to select the specific attachment and call download()
$message->attachments[$id]->download();
It should output the correct headers and spit out the file assuming no other content has been output yet.