Forum Moderators: coopster

Message Too Old, No Replies

Can this be done?

PHP+mySQL e-mail-into-DB script?

         

gutabo

5:15 pm on Feb 11, 2003 (gmt 0)

10+ Year Member



Hi guys!

I have to send a massive email asking peeps to fill a form, and if they do, they will receive some relevant info as a mail.

I would like to know if I can have a script that automatically gets data from an email?
*starts to think*
Or, maybe I would just insert a frame/iframe within a mail with some php code to insert the fields data into the mySQL DB, and then sends a thankyou email...

Anyway, how do YOU accomplish this?

Thanks in advance!

The G man (hehe)

andreasfriedrich

5:33 pm on Feb 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



gutabo [webmasterworld.com] wrote at 05:15 AM on Feb. 11, 2003 in message #1 [webmasterworld.com]
I would like to know if I can have a script that automatically gets data from an email?

Sure. There are lots of ways to set this up. They will depend on the setup you use to receive mail especially the local MTA you use. They all let you deliver mail to a process instead of some mail box.

Andreas

dingman

6:03 pm on Feb 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your mail is on a *nix server (Linux, BSD, Solaris, etc), look into Procmail (hint: 'man procmailrc') and possibly the syntax for a '.forward' file.

gutabo

7:08 pm on Feb 11, 2003 (gmt 0)

10+ Year Member



OMG...

andreasfriedrich:
MTA? What's that?</blatantly ignorant 'bout that acronym... and many others>

dingman:
how am I supposed to do that?</blatantly ignorant 'bout uni*, linu* ... and lots of ish>

*shrugs*

Thanks for the replies!

dingman

7:22 pm on Feb 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



MTA == Mail Transport Agent, the mail server software.

Procmail is a mail filtering program available on most Unix and Unix-like systems that lets you use an inscrutable configuration file to do anything you can think of with your mail automatically. Amongst the many things it can do is pass your incoming mail to another program when it comes in. You can use the configuration file to specify when one thing should be done with a message, and when another should be done instead, too, so you wouldn't have to send *every* message to your program.

<added> Oh, and the 'man' command is the easiest and most universal way to get help from a *nix command line. It is short for 'manual'. 'man foo' will display the manual page about foo.</added>