I did a bit of research on the same subject a couple months back for an
upcomming project. I still have not gotten to it so wont have to many
specifics for you, but what I would recommend is NOT using php for this
task. I would say your best bet, assuming a unix install, is to use
procmail to filter mail and remove attachments to a given directory.
Procmail will need help from something like metamail to decode the
attachment and save it. Then have PHP do the work of putting the file
into the DB. Just my 2 cents.
Mattias Segerdahl wrote:
>
> Good morning,
>
> I've been trying to find out how to use IMAP to read attachments from the
> MIME E-Mail and save them on the filesystem and later transfer them into a
> RDBMS, the problem I have at the moment is that I have no clue what so ever
> how to do this, I've tried using imap_headerinfo and other imap_command to
> check if anything show up in the given ARRAY or OBJECT that will show that
> the mail contains an attachment. But I havn't been able to do this so far. I
> bet there are hundreds of you out there that probably has done that same
> thing that could help me and guide me to what I should look for, this is in
> a bit of a hurry. And since I've been trying to solve this problem myself
> and tried not to bother the list with this, I really do need the help now.
>
> So, if anyone could spare a few minutes of their time and give me some
> guidelines, I would really love it.
>
> I know that I should look for "#$message .= (Content-Disposition:
> attachment; filename="") in some way, but I don't know how, or where to go
> from there.
>
> Thanks in advance,
>
> // Mattias
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Larry Hotchkiss
Universal Capital
612-551-9309
http://www.unicap.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]