Re: [exim] Exim & PHP

Góra strony
Delete this message
Reply to this message
Autor: Bob Johannessen
Data:  
Dla: exim-users
Temat: Re: [exim] Exim & PHP
Andrew Wood wrote:
> I'm trying to get PHP to send mail by using Exim as a local MTA.

...
> calling exim, but exim is ignoring the request and not writing anything to
> the logs.
> I suspect therefore it doesnt like the command syntax it's being called
> with? PHP uses -t and -i by default but I cant see why these would be


I have no idea what your problem may be, but I use the following
to send e-mail from PHP and it seems to work fine:

$to = escapeshellcmd($to);
$from = escapeshellcmd($from);
$exim = popen('/path/to/exim -f ' . $from . ' ' . $to, 'w');
fwrite($exim, $message);
pclose($exim);


    Bob