Forum Moderators: coopster
For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them.
There is only one user-contributed note on exim and I'm not sure if it is going to be helpful to you or not...
I've also checked that the user httpd has permission to access exim and it can.
I compiled it as root so there wouldn;t have been an access permission issue there.
If php is firing it off without error, something should at least be showing up in your logs or in the queue.
Yes, unless PHP "cant find" exim. Which is what I think's happening here even though sendmail_path is set.
Otherwise exim would at least have something in its log saying that a send request was initiated.
Remember that mail() is returning false. If it was returning true then exim would be accepting the message and the fault must lie there somewhere, but false means exim wouldnt accept the message, and as exim has no record of it, it must also mean it was never passed the message. Surely?
Unless of course....PHP is calling exim with some incorrect syntax.
If I do that on the command line exim just spits out a useage msg and termiates with nothing in the log. Mybe thats whats happening, but if so Ive no idea how to find out. Stupidly there seems to be no way of extracting more detailed error info out of the mail function result, like you can with the database functions.
UPDATE!
It IS calling exim. By very quick keystroke work I caught it with the ps command wilst the php page was loading. Ummm...
I use this with sendmail as well, easier and faster sometimes though it requires a little programming.
sometimes though it requires a little programming
surely it must be possible to do it using the standard mail function?
does the -i option take an argument stating what the end of message deliminator is? i'll have to look it up, the exim documentation doesnt mention it, i'll look it up for sendmail, but i dont have my sendmail book here so, if anyone happens to know the anwer off the top of their head I'd be grateful if you could post it.
ta.
Before, I forced it not to use -i, by specifying the other arguments manually (goodness knows what you do if you dont want it to use any arguments?!)
And then appended \n. to the end of the message body, which worked. Thats how I knew it was -i causing the problem. It just occured to me maybe if -i isn't specified \n. isnt needed and it will automatically use the end of string as the end of message indicator - AND IT DID!
So for the record here's the solution:
Dont let PHP call exim with the default options, manaully tell it like this:
sendmail_path = /path/to/exim -t
Thanks everyone for your help and suggestions!