Handling E-mail Attachments In Php Filter?

liunx

Guest
Suppose I want to be able to e-mail an image file to an address at my domain and have it automagically dropped into a particular directory. I know how to write a PHP filter to read stdin and parse it 'n' stuff, but I have no idea how to grab the attachments and save them off. Does anybody know how to do this?<br /><br />Thanks!<br />Sam<!--content-->
Welcome to the forums Sam. Sorry I don't have an answer for you, but I'm sure someone will be along shortly that can help you out!<!--content-->
Welcome to the forums, Sam! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/thumbup1.gif" style="vertical-align:middle" emoid=":thumbup1:" border="0" alt="thumbup1.gif" /> <br /><br />From what I've seen in both Perl and PHP, there are libraries available to interact with a mailbox, grab any e-mails sitting in the account, extract any attachments, and save them where you want. I have not seen any kind of code that would do the same thing from a filter script though.<!--content-->
Welcome to the forum, Sam. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Welcome to the forums Sam<!--content-->
Welcome to the forums Sam<!--content-->
<!--quoteo(post=153505:date=Oct 27 2005, 11:33 AM:name=TCH-David)--><div class='quotetop'>QUOTE(TCH-David @ Oct 27 2005, 11:33 AM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=153505"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->From what I've seen in both Perl and PHP, there are libraries available to interact with a mailbox, grab any e-mails sitting in the account, extract any attachments, and save them where you want. I have not seen any kind of code that would do the same thing from a filter script though.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />Okay, I found a nifty little script <a href="http://www.php.net/manual/en/function.imap-fetchstructure.php#54438" target="_blank">here</a> to do that. I haven't tried it yet but will let you know when I get it working.<br /><br /> <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/tchrocks!.gif" style="vertical-align:middle" emoid=":tchrocks!:" border="0" alt="tchrocks!.gif" /><!--content-->
 
Top