Re: [PHP] Passing emails to database

2003-02-24 Thread Justin French
Please keep the emails on-list, so that others can learn, and search the
answers in the archive -- that's the whole point of the list.


on 25/02/03 12:14 AM, Alberto Brea ([EMAIL PROTECTED]) wrote:

 Justin,
 Thanks for your answer
 The only real problem seems to be how to capture the different parts of an
 incoming email (from, date, message, etc) somehow into PHP variables.

Did you even read the IMAP page on php.net?
http://www.php.net/manual/en/ref.imap.php

I doubt it, because it clearly shows a list of imap functions, including
imap_body(), imap_subject(), etc etc.

Please at least do SOME research before asking questions.


 Then you INSERT them into the (e.g.MySQL) database or do anything else with
 them.
 Is there an easy way to do this? I have never used IMAP functions, but I can
 learn if this is the way.

I doubt you've got imap functions installed at the moment... it requires
extra components, so that may be your first issue.


 As to your comment, my PHP is installed as an Apache module (on Windows), not
 as CGI.

Well then that rules out one of the two options (using .forward to pass the
emails to a PHP script).  You'll need either PHP as CGI, OR the IMAP
functions AFAIK -- your choice.


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Passing emails to database

2003-02-19 Thread Alberto Brea
Hi, list
Is there any way in PHP to pass the emails received automatically into a local MySQL 
database on the same machine (i.e. the fields datetime, from, to, message, 
subject, etc), without copying and pasting each message? Maybe by retrieving and 
parsing the Outlook Express files that keep the emails? (the e-mail is received by 
Outlook Express, and via browser from a Yahoo account).
Thanks for any help

Alberto