[PHP] PHP Script to remove attachments from emails and store them on the server
Hi all I have a script that is currently running on my server which intercepts messages being sent into a specific address, it is piped to this through an alias in the aliases file. What would I need to add to this script in order for it to firstly check for the presence of attachments to any email message and secondly if any are detected how can these be saved to disk locally on the server that this is running on Thanks Simon
RE: [PHP] PHP Script to remove attachments from emails and store them on the server
Thanks for your help Jason, have you got any examples that you might be able to send me on how you have used reformime to decode email messages -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 05:35 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Script to remove attachments from emails and store them on the server On Monday 18 November 2002 07:34, Simon Chilmaid wrote: > Hi all > > I have a script that is currently running on my server which intercepts > messages being sent into a specific address, it is piped to this through an > alias in the aliases file. What would I need to add to this script in order > for it to firstly check for the presence of attachments to any email > message and secondly if any are detected how can these be saved to disk > locally on the server that this is running on You can have a look at the chapters "IMAP, POP3 and NNTP functions" & "mailparse functions" to see if there are any suitable functions there. What I do is run reformime (google for that if you need to) to extract all message parts. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* QOTD: Silence is the only virtue he has left. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Script to remove attachments from emails and store them on the server
Where would I need to add this line in, does it get added to the aliases file or do I add it into the script that I already have for processing the emails -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 20:49 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Script to remove attachments from emails and store them on the server On Tuesday 19 November 2002 03:54, Simon Chilmaid wrote: > Thanks for your help Jason, have you got any examples that you might be > able to send me on how you have used reformime to decode email messages Basically if you want to extract and save all attachments then you just pipe the message to reformime specifying the -x switch: cat mail_message | reformime -x -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I got this powdered water -- now I don't know what to add. -- Steven Wright */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php