|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi folks,
My plan is to realize this : Anybody sents a mail with Text and attachment to the e-mail adress URL. My mailserver is putting this mail into the ascii file of the mail account (for example in the file web1_3) - so far so good. Now i want a script which scans permanently the file of this mailaccount, extracts the attachement - stores the file in any path of the server and puts the text into an table of a mysql database. Anybody got an idea if there is a ready-to-use script or a script i could start and manipulate ? For better understanding : I have a picture archive for users and i want to offer them them the possibility just to send an e-mail with a little text and just after sending the file is available in my running gallery with the text under the picture. ( I alredy have the gallery script - i'm just searching for the shell script as interface between mail and gallery). Hopefully anybody got an idea ? Greetings, OllO |
|
#2
|
||||
|
||||
|
One idea would be to use procmail and set up a filter for incoming mails to user@test.com and have it call a perl script which uses DBI and DBD::MYSQL to insert the contents into a mysql database.
As for the images, checkout the procmail mailing list for a few ideas. These lines were found here, and should give you something to start with Code:
##################### # delete all .pif, .scr, .com, and .bats :0 B *^Content-Type: (audio/x-wav|application/octet-stream|multipart/mixed|audio/x-midi); *.*name=.*\.(pif|scr|com|bat) /dev/null ###################### //NoXcuz
__________________
UN*X is sexy! who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep |
|
#3
|
|||
|
|||
|
Has anyone had any luck tracking down more information on this?
I am looking for more info and just wondering if it is possible to do with PHP. Know any sites with a script or how to? cheers! ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > File upload by email plus mysql entries ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|