Page 1 of 1

Need help in Email.. PHP Newbie?

Posted: Sun Nov 28, 2010 10:47 am
by rajaseeth
Hi,

I am new to PHP programming. I have been given a task for storing the email details that comes to mail server to database. I do not need a full email application, i mean that i will create a batch file that runs every 2 mins to check the mail server, if there is a new mail, then put an entry to the database. If there are attachments present, then i will have hv to download it and store it in a folder and also put an entry in database. How to do it?

Thanks,
Rajagopalan.

Re: Need help in Email.. PHP Newbie?

Posted: Sun Nov 28, 2010 3:09 pm
by NeooeN
For first you should tell us what exacly does the script is going to do. Is it going to connect to the server itself or do you have some external tool for that? What kind of server are you going to connect? Is it pop3 or IMAP or something else? If it is IMAP you can try with this: http://pl.php.net/manual/en/imap.requirements.php. As I see in the documentation you can use it for pop3 also. If it is about writing datas into files try those two functions: http://pl.php.net/manual/en/function.fi ... ntents.php and http://pl.php.net/manual/en/function.fi ... ntents.php, this is the simplest way I thing. What is about putting datas into the databases it depends on what kind of database are you going to use.