views:

40

answers:

1

I'd like to be able to upload photos via email, which I've seen (and used) on eat.ly and meetups.jquery.com but I haven't been able to work out how to do this, does anyone have a solution?

Essentially I believe the process should be something like this: 1) user adds picture to email on mobile device then send to a specific email address, say '[email protected]' 2) email server, cron job or something else looks at the senders address and tells it to add the attachement to that account 3) photo shows up on users profile page

I run Apache servers, with MySQL, PHP, and a JQuery framework. I have email servers running Courier, and I missing anything?

+1  A: 

The simplest way to do this is to make a cron job that checks the email account using POP, and parses and process any incoming emails.

To read the image attachments, you'll need a MIME parser.

For more specific advice, please tell us what language you're trying to write the script in.

Here is a PHP POP client.

SLaks
Thanks SLaks, sorry I thought I put those details below, but maybe I should have been more specific. I can write in most languages, but for this project I'd like to stick to the above, so PHP ideally.
Lee
You said PHP, but that doesn't necessarily mean that you want to write the _cron job_ in PHP.
SLaks
true! easy enough to do in PHP though? i'll give it a go now and let you know how i get on! thanks.
Lee
Works very nicely, thanks for that!
Lee