Re: Handling Incoming Email Attachments

From: Date: Tue, 06 May 2008 09:52:05 +0000
Subject: Re: Handling Incoming Email Attachments
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-273939@lists.php.net to get a copy of this message
For handling e-mail in all their sorts (believe me, it is hell), I found the PECL mailparse the best solution. It can find the attachments and their MIME-types in a snap. And all the headers are separated too. You only have to wrap functions around it to do what you want to do. Be sure to validate the attachments and do not rely on the MIME-type only. People can spoof that kind of files.
There's also the PEAR mimeDecode class as well. A PHP solution so it won't require you to reconfigure/compile anything. -- Richard Heyes +----------------------------------------+ | Access SSH with a Windows mapped drive | | http://www.phpguru.org/sftpdrive | +----------------------------------------+

« previous php.general (#273939) next »