Re: mail() sendmail problems
| From: | Chris Hewitt | Date: | Mon, 23 Feb 2004 20:35:20 +0000 |
| Subject: | Re: mail() sendmail problems | ||
| References: | 1 2 3 4 5 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-12844@lists.php.net to get a copy of this message | ||
Elijah A. Chancey wrote:
The command mail works perfectly. What sorts of php things can I investigate? e On Feb 23, 2004, at 1:40 PM, Chris Hewitt wrote:You can check in php.ini for the "sendmail_path" option being uncommented, and set to something suitable, commonly: sendmail_path = /usr/bin/sendmail -t -i You could also just check by pointing a browser at a phpinfo() file that the php.ini that you are checking is where PHP is looking for it. I have not used the newer sendmails with submit.mc, I use sendmail here but all emails are sent to my ISP's email server which I have configured as the smart_host. This is not likely to be a problem for you as an ordinary user can send email. I don't use the inbuilt mail command in PHP, but a more flexible wrapper class from php-classes.org so I can only assume that your PHP mail command syntax is OK. Other than the above, I can't think of anything to go wrong. HTH Chris PS I've got to go now, be around in the morning.Elijah A. Chancey wrote:(Lets do the conventional bottom posting and keep this on the list).Can a normal user send mail via which means? e On Feb 23, 2004, at 11:35 AM, Chris Hewitt wrote:Yes, all users on a unix box should be able to send email. From a prompt: mail -s "mysubject" toyou@yourbox.com <filewithmessage will do it. Do a "man mail" for more information. It will use whatever email system you have set up on the computer, thus it is a good test to see where email may be going wrong. When you have email going from a normal user OK then its time to check from php again. HTH ChrisElijah A. Chancey wrote:I'm having difficulty with the php mail() function. Freebsd 4.9, apache 2.0.48, php 4.3.4 Here is my code: <?php mail("sysadmin@netlinkip.com", "subject", "body"); ?> The problem: The mail is not being delivered to my address. PHP returns no errors.Can a normal user send email? If so then it is a php problem, if not a sendmail one. I think that will help to narrow it down a bit. HTH Chris