Re: mail() and exim4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Per Jessen schreef:
Chris Haensel wrote:

I am having some problems with our new server. exim4 is installed, and
I am trying to send a mail via the mail() function.

Script:

<?
ini_set ("error_reporting",E_ALL);
echo ini_get("error_reporting")."<p>";
if(mail("haensel@xxxxxxxxxxx","test","ding")) {
echo "Ja";
} else {
echo "Nein";
}
?>

Exim is a Mail Transfer Agent. It is normally called by Mail User
Agents, not directly from a shell command line.

The command line 'sendmail' or 'mail' is also an MUA, as is the PHP
mail() function.

exim should come with a sendmail compatible wrapper script ... which, to be
compatible is called sendmail.

on *nix boxes php's mail() function is a wrapper to the sendmail program/script/wotsit,
php needs to be configured (as per Per's comment) as to where sendmail is installed
(and optionally which special commandline args to include e.g. -f or some such).

so either:

1. the exim sendmail wrapper is not installed
2. php is looking for sendmail in the wrong place
3. you need to tell php to pass some extra args to sendmail when it call's it from the mail() func
4. a combination of the above.

I don't know anything about exim, but check that you've got 'sendmail'
installed (for use from the command line).  Alternatively, check what
exim expects to use, and amend the php.ini::sendmail_path accordingly.

/Per Jessen, Zürich

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux