Hi,
Can anyone point me in the right direction for retrieving my emails into a MySQL database?
I have a script that I send emails from using PHP mail() and would like to store the replies to sent messages in the same database and not really have to open Outlook to read them.
I've tried looking for some examples and tutorials but "emails" and "php" returns a vast amount of info in a search engine.
Anyway, I hope someone knows of a good example/tutorial.
Thanks.
Email to database
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Actually its very easy if your hosting control panel allows you to forward emails of an account to a script that can be executed in command-line.
CPanel has an option to forward a mail to a script. Forwarders > Add > Pipe to a Program. So you probably would get ton of results specific to Cpanel powered hosts/sites.
Read this article if you're having root access.
CPanel has an option to forward a mail to a script. Forwarders > Add > Pipe to a Program. So you probably would get ton of results specific to Cpanel powered hosts/sites.
Read this article if you're having root access.
Search for pipe email. Keyword is pipe.I've tried looking for some examples and tutorials but "emails" and "php" returns a vast amount of info in a search engine.
If you aren't using cpanel you can just use the imap commands to login to a pop or imap email account and download mail then you could store it into a database.
http://us3.php.net/manual/en/ref.imap.php
http://us3.php.net/manual/en/ref.imap.php
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London