Re: [Exim] PHP Form to send emails with Exim

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Scott Courtney
Date:  
À: Dan Muey, Jason Gerfen
CC: Exim
Sujet: Re: [Exim] PHP Form to send emails with Exim
On Wednesday 11 February 2004 13:35, Dan Muey wrote:
> > I have been looking around the web for some examples of how
> > to use a PHP form to send emails using Exim installed on the
> > localhost.  I have tried adding the command line to send
>
> Perl has many mail features, and is way easier to get working
> than to figure out how to get PHP to do anything. What I'd do
> if I were you is simply use a module that does an SMTP session
> with localhost, that way there's no Exim config to do.


This strategy is also easily workable in PHP, using a module that in recent
PHP versions is part of the downloaded language tarball. I don't know about
"easier to get [Perl] working"...that's a debate for another list. But I've
done several PHP applications that send mail, with no great difficulty.

Start here (for the specific modules you need):

http://pear.php.net/manual/en/package.mail.php

and here (for an overview of PEAR):

http://pear.php.net/manual/en/

If you need some example code, email me off-list, since PHP coding techniques
are off-topic for the Exim list. :-)

The PEAR mail modules support a variety of techniques: local or remote SMTP
session, invocation of mail command, etc.

The PEAR libraries are installed by default when you build PHP from source;
I'm not sure of their status with a binary PHP installation, though I do know
that they come with the RPM version of PHP under SuSE 8.2 and 9.0.

Scott

--
-----------------------+------------------------------------------------------
Scott Courtney         | "I don't mind Microsoft making money. I mind them
courtney@???       | having a bad operating system."    -- Linus Torvalds
http://4th.com/        | ("The Rebel Code," NY Times, 21 February 1999)
                       | PGP Public Key at http://4th.com/keys/courtney.pubkey