Re: Handling Incoming Email Attachments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 05/06/2008 06:36 AM Nirmal Jayasinghe said the following:
> hello all,
> 
> I'm trying to figure out a way to manipulate incoming email attachments with
> PHP. There'll be a special email address to which the emails with the
> attachments would be sent, with a number specified in the subject line. What
> I need to do is to grab the attachment (a photo), rename it with the number
> specified in the subject line, and move it onto a specific folder on the Web
> server [which will be running LAMP].
> 
> I couldn't find any online material describing how to manipulate incoming
> mail attachments. Can someone give an idea?

You may want to try this MIME parser class. It can parse the e-mail
messages of any size and optionally save the attachments to files in a
directory of your choice.

http://www.phpclasses.org/mimeparser

If want to parse messages retrieved from a POP3 mailbox, you may also
want to use in conjunction this POP3 class which comes with a stream
wrapper that lets you access messages in the POP3 mailbox as if they
were files. You can use file names like this: pop3://pop.server.com/1 .

http://www.phpclasses.org/pop3class

When used in conjunction, these two classes allow you to extract
attachements from messages of any size without exceeding your PHP memory
limits.

-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux