> What is the best way to capture an email sent to a server so
> that I can copy it and send it to a number of emails selected from a db.
>
Here's one way to do it:
- You'll need to compile PHP as a cgi executable
(http://php.net/manual/en/install.commandline.php).
- If you are using sendmail you can set up an alias that will direct the email
to a program (you can get this same behavior with other mail delivery agents as
well).
- Have a PHP script that reads from standard input to get the email message
(http://www.php.net/manual/en/function.fopen.php).
- From there you can do whatever you need to with the email.

If you need to parse the email into pieces and/or deal with HTML email,
attachments, etc. then you can check out the source code that runs
http://www.p3mail.com/  He has a number of libraries available that will help
take care of that.

- Jamie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to