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

Top Page
Delete this message
Reply to this message
Author: Rick Cooper
Date:  
To: Jason Gerfen, exim-users
Subject: RE: [Exim] PHP Form to send emails with Exim

> -----Original Message-----
> From: exim-users-admin@???
> [mailto:exim-users-admin@exim.org]On
> Behalf Of Jason Gerfen
> Sent: Wednesday, February 11, 2004 3:28 PM
> To: exim-users@???
> Subject: RE: [Exim] PHP Form to send emails with Exim
>
>
> Sorry but I use both PHP and Perl so I am not going to
> say anything
> about what is better or not. For those that are
> interested in helping
> me configure my php.ini to use exim vs. sendmail here
> is my current
> configuration for the sendmail directives in php.ini.
>
> sendmail_path = /usr/exim/bin/exim -t -odq
>
> I have also tried to make a symbolic link from the
> sendmail file to
> point to the exim binary with no luck. For my mail
> the simple php code.
> <?php
> $to = "email@???";
> $sub = "Subject line";
> mail($to,$sub,$_POST['$msg']);
> ?>
>


I use PHP not only for web applications, but as my default shell
script (cli) on all the servers I oversee. I have dozens of php
scripts and a few php based daemons that send me mail (html and
text) daily. The only thing I have found that PHP doesn't do that
perl does is make me crazy with all the "magic" var crap ($_). My
sendmail line in php.ini is as follows:

; For Unix only. You may supply arguments as well (default:
'sendmail -t -i').
;sendmail_path =

Yep, default. Now something you say above makes me wonder... why
can't you symlink to the exim binary? It sounds like you have not
renamed or removed sendmail before attempting to make the link.
in any even since sendmail -t -i works fine I would think
exim -t -i would as well, since my sendmail is exim.

You may want to go to http://www.phpclasses.org and look for
class htmlMimeMail it vastly simplifies handling smtp, mime,
attachments, auth smtp, and I believe it also has a email address
validator that will do callout verifies (or I may have added that
I can't remember)

If you can't figure out the symlink for sendmail, then rename
sendmail to sendmail.old and cp your exim binary to the old
sendmail location.. but you should be able to symlink it.

Of course everything depends upon having a working exim
configuration as well as php.

Rick