Re: check email content & send onto MySQL
| From: | David Robley | Date: | Fri, 20 Oct 2000 08:01:06 +0000 |
| Subject: | Re: check email content & send onto MySQL | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21345@lists.php.net to get a copy of this message | ||
On Fri, 20 Oct 2000, Nicolas Windpassinger - Sun Microsystems wrote:
> Hope some of you will be able to help, here it comes:
>
> i have a server called flimp ( Apache with php4 module) running with a
> MySQL server.
>
> i would like to get the content of emails send by a program called teamware
> .the infos contained in the email are like this:
>
> thename (version name)
> 1.2.4 (version number)
> 11-10-2000 (version date)
> blabla bla blablablabla (version comments)
> bill gates (version owner)
>
> Then take those and put them in one of MySQL table called manpages.
>
> The problem is: -i don't know how to catch the email get the infos from
> it, (what type of script??)
> - pull them out (what type of script??)
> -and then onto the MySQL table: manpages: like
> a MySQL querry such as :
> INSERT INTO manpages (version name,version number,version date,version
> comments,version owner)
> VALUES ($version name,$version number,$version date,$version
> comments,$version owner); (what type of script??)
>
> In short how do i do: infos in mail -> catch -> infos out -> insert in
> table
>
> thanks in advance for your help,
> nicolas.
The answer I gave someone else yesterday will do again :-)
Off the top of my head - compile a cgi version of PHP; write a script (and
make it executable and put #!/path/to/php on the first line) that does what
you want which you fire up by piping the email to the script via your alias
file (or qmail equivalent) or procmail or whatever.
How to get the content of the email? I think via stdin?
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA