Knowledgebase

Portal Home > Knowledgebase > Articles Database > PHP code to move file from email to server


PHP code to move file from email to server




Posted by riverman27, 08-20-2011, 07:56 AM
Hi Guys, New to the forum so thanks for having me on board. In desperate need of help....... im new to all this php coding and server stuff. Just launching a website and a new business venture, my supplier update the stock levels every hour and email me in .txt format I want this .txt uploaded to my server....any help much appreciated. Thanks in advance.

Posted by iTom, 08-20-2011, 02:40 PM
If your in control of the server I would install maildrop and then just filter out your supplier eMails. You can then pipe this into a script (such as PHP) and perform what ever actions you need to. However if your not in control of the servers MTA you will probably need to use something like a php IMAP class to fetch the eMail and attachements, then perform the saving etc...

Posted by riverman27, 08-20-2011, 03:20 PM
Thanks for your response. I don't control the server I am afraid, My host is Siteground. So I gather it will be a dev for sure then. Thanks for the advice. Regards, Mark

Posted by iTom, 08-21-2011, 02:25 AM
You don't have to use a Dev, have a look at a class like this one: http://www.phpclasses.org/package/29...a-mailbox.html

Posted by avinah, 08-23-2011, 02:09 AM
I don't know about how to move file in PHP code from email to server. Please give me some suggestions.

Posted by activechase, 08-27-2011, 03:53 PM
Are you familiar with PHP ? I didnt get exactly what you are trying to do but the function copy() will help you.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Uptime Guarantee (Views: 521)
Personal Nameservers (Views: 546)


Language:

Contact us