tags:

views:

93

answers:

3

I am working on a futur projects that will get information to a private website not from interface but from email. After some research, posterous.com is doing something interesting, posting on personal blog from email. flickr is doing the same thing with photo attached from email and post it n the server to show off

My question. Where on the net I can find proof of concept or already made script that do

  1. read pop email account at specific interval (each 5 minutes)
  2. extract subject and content of the mail
  3. get attachment photos
  4. save that specific information to file on server

all that can be done with php, but my qualification is not good enough to do that myself, but i can adapt some script for sure !.

A: 

I don't know about existing software, but if you wanted to write your own script, Zend Framework's Mail component would certainly make things easier.

David Caunt
+1  A: 

If you look at something like the Zend Framework's Zend_Mail libraries - http://framework.zend.com/manual/en/zend.mail.read.html - you'd be in good shape. I've been using it for retrieving email for other purposes and it gives you a nice little object with all the headers in an array. Use the data you need and then dump the rest.

CaseySoftware
A big tip for dealing with Maildirs on local disk: Zend_Mail_Storage_Writable_Maildir wiil let you delete/update the messages. It's not easily found in the docs though.
Alister Bulman
A: 

Looking around quickly I found two scripts that hold promise:

http://www.weberdev.com/get_example-4015.html

and

http://www.nerdydork.com/download-pop3imap-email-attachments-with-php.html

It looks like both could be modified to suit your needs.

Rob