Does anyone know some PHP program that can retrieve mail and store attachments to disk?

These forums are CLOSED. Please visit the new forums HERE
How to store mail attachment? |
|
Anshe Chung
Business Girl
Join date: 22 Mar 2004
Posts: 1,615
|
03-14-2005 07:57
We already managed use PHP scripts to retrieve normal email from mail server. This is kinda useful to allow prims send commands to website. But how to retrieve picture attachments sent with the postcard feature?
Does anyone know some PHP program that can retrieve mail and store attachments to disk? ![]() _____________________
ANSHECHUNG.COM: Buy land - Sell land - Rent land - Sell sim - Rent store - Earn L$ - Buy L$ - Sell L$
SLEXCHANGE.COM: Come join us on Second Life's most popular website for shopping addicts. Click, buy and smile ![]() |
splat1 Edison
Registerd Nut
![]() Join date: 6 Sep 2004
Posts: 353
|
03-14-2005 11:09
Erm.. try php.net site ?
_____________________
Splat Soft - We exsist in the RL to!
Gigas Bunny (Mule) #### You see, our experts describe you as an appallingly dull fellow, unimaginative, timid, lacking in initiative, spineless, easily dominated, no sense of humour, tedious company and irrepressibly drab and awful. And whereas in most professions these would be considerable drawbacks, in chartered accountancy they are a positive boon. |
Eddie Bombay
Network AdmÃn.
Join date: 9 Sep 2003
Posts: 34
|
03-14-2005 11:10
Greed is a bottomless pit which exhausts the person in an endless effort to satisfy the need without ever reaching satisfaction.
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
03-14-2005 11:37
Greed is a bottomless pit which exhausts the person in an endless effort to satisfy the need without ever reaching satisfaction. Oh great, Eddie. So should we respond to all of your queries in this forum with a sentence or two about Envy or Malice? Anshe, it's kind of odd to retrieve emails via PHP. Usually what you want to do is change your mail server's configuration files to react to emails sent to a specific address by running a program. Maybe that's what you do, I'm not sure. Anyway, you can do that by adding a "pipe" line in /etc/aliases. Look in your mail server's documentation for more details. As for how to actually parse the emails sent by the postcard feature, you should look for a library that can handle MIME attachments. I've found one here: http://search.cpan.org/~dskoll/MIME-tools-5.417/lib/MIME/Parser.pm That's a PERL module that will do all the dirty work for you. I couldn't find a PHP one because this is not really a good use of PHP. If you don't want to deal with PERL, you can probably find a standalone program that will parse a MIME email for you, and just run the email through that. |
Ming Chen
Here since 0.4.1!
Join date: 3 Sep 2003
Posts: 524
|
03-14-2005 12:50
ive done it in PHP, just for postcard snaps ^_^
_____________________
|