• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

[PHP and mysql] Just curious...

OriginXT

New Member
I'm wondering, is there any way to make a mail script that catches all the mail sent to the server, and instead of storing it to where it normally goes, it inserts it into the mysql database?

Just wondering...
 
Sorry to butt in but this is your most recent post- FYI I tried to PM you here and it won't let me, says you've got em turned off or aren't allowed to receive em anymore :confused2 But anyway I've got your IM's so I'll see ya on trillian :cool2: Nice site BTW!
 
Heh, no prob :D

I'll go and delete all my PM messages...

Or just IM me, or PM me thru my forums. thanks!

But, please back on topic (dont wanna get in trouble...)

Anyone know how?
 
Quick answer: it's not going to work the way you want it to work.

It might work if your SMTP server has a trigger event somewhere, where it would launch an external program once it receives email but then your host still needs to be persuaded to allow you to actually use it.
A more feasible way is check with your host if you're allowed to use cron jobs and write a PHP script that will connect to the mail server, download any new messages and store them in the database at regular intervals.
Failing that and your computer is online 24/7, set up a local task to run every hour or so that will go to a page that does the same thing as the cron job would.

What do you need to store email in a database for anyway? :confused4
 
Back
Top