[dev] Getting attachments

Michael J Rubinsky mrubinsk at horde.org
Sun Jan 12 18:06:00 UTC 2014


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Claus Ruete <claus.ruete at student.uni-tuebingen.de>:
>
>> Hi,
>>
>> i've been trying to get a list of attachments out of a  
>> Horde_Mime_Part object, still, I can't get it to work, as I'm  
>> looping through all subparts but $part->getDisposition() never  
>> returns anything.
>>
>> I thought i'd get back something like "ATTACHMENT" but it just  
>> returns null, so I tried finding out where the content-disposition  
>> header can be found in the object by just using print_r($part) but  
>> it didn't show up :(
>
> Content-Dispositon is not guaranteed to be present. You would be  
> better off looking for non-text parts that do NOT have an in-line  
> disposition set, or for text parts that are both not in the base  
> mime-part and that do not have an attachment disposition set.  
> Depending on what you are looking to do with the attachments, the  
> requested disposition might be irrelevant anyway.

..and of course, that last condition should have been that do not have  
an in-line disposition set.

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/dev/attachments/20140112/b7775558/attachment.bin>


More information about the dev mailing list