Re: Upload via email?

From: Date: Thu, 16 Feb 2006 04:50:53 +0000
Subject: Re: Upload via email?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-230510@lists.php.net to get a copy of this message
On Wed, 2006-02-15 at 22:37 -0500, Michael Crute wrote: > On 2/15/06, Nicholas Couloute <njcjr@tmail.com> wrote: > > How would u make a script that uploads files to ur server via email? 1. > > user emails the server 2. if there is a audio file (amr) attached then > > add it a folder! Are there any scripts that can do that? > > > This will take some work but what you want to do is setup a email > account that you designate as the "upload email". You will want to > write a script to access this email box and download the content > directory. Will probably cron this script. > I contributed a class to phpclasses.org a while back that does this. Check it out here: http://www.phpclasses.org/browse/package/2816.html It relies on PEAR Net_POP3 and Mail_Mime to do the heavy lifting. The class method that end off the process returns an array of the message body, subject etc, as well as a reference to the file that is attached. I use it quite extensively in our e-learning system and framework as well, so it works well. --Paul

« previous php.general (#230510) next »