RE: [PHP] mail function fails

From: Date: Mon, 02 Jul 2001 15:19:07 +0000
Subject: RE: [PHP] mail function fails
Groups: php.general 
Request: Send a blank email to php-general+get-55844@lists.php.net to get a copy of this message
I don't think that is it anymore. I have a new discovery. Upon running the actually PHP script from the console, the code works! But only when I am logged in as root. When logging is as anyone else, the mail() function fails with a Permission Denied on /usr/sbin/sendmail So, it would appear that sendmail is not configured to allow others to use it? Is there a quick easy way to fix this? Thanks! Ryan -----Original Message----- From: Michael Geier, CDM Systems Admin [mailto:mgeier@cdmsports.com] Sent: Monday, July 02, 2001 10:57 AM To: Shrout, Ryan Subject: RE: [PHP] mail function fails RPM's tend to hose installations. May I suggest: rpm -qa | grep php rpm -e [insert php rpm name here] rpm -e [apache rpm] get the source for apache 1.3.20 (http://www.apache.org) get the source for php and compile per installation docs on php website You will enjoy the results alot more. -----Original Message----- From: Shrout, Ryan [mailto:Rshrout@krauss-maffeicorp.com] Sent: Monday, July 02, 2001 9:46 AM To: 'Michael Geier, CDM Systems Admin' Subject: RE: [PHP] mail function fails Well, just using Red Hat 7.1 and sendmail with PHP 4.0.5. Sendmail was installed default in the RH installation, and then I installed the latest PHP RPM afterwards. Oh well. Ryan -----Original Message----- From: Michael Geier, CDM Systems Admin [mailto:mgeier@cdmsports.com] Sent: Monday, July 02, 2001 10:45 AM To: Shrout, Ryan Subject: RE: [PHP] mail function fails Are you trying to use a MTA besides Sendmail? Some info would be helpful, such as: OS MTA (Sendmail Qmail, etc) PHP version If you installed PHP without sendmail installed, mail() will not work. That doesn't mean that you can't use a different MTA. When I switched to Qmail on a new server, a had a problem with mail() not working. I reinstalled OS (redhat 7.1) with sendmail, installed PHP (4.05), installed QMAIL per docs concerning replacing sendmail, changed php.ini file to reflect sendmail_path = /var/qmail/bin/qmail-inject. HTH --- Michael Geier CDM Sports, Inc. - Systems Administrator email: mgeier@cdmsports.com phone: 314.991.1511 x 6505 pager: 314.318.9414 -----Original Message----- From: Shrout, Ryan [mailto:Rshrout@krauss-maffeicorp.com] Sent: Monday, July 02, 2001 9:23 AM To: PHP Mailingliste Subject: RE: [PHP] mail function fails Darn, still didn't work. Anyone else have a suggestion? Or a way to view an error message of some kind? Ryan Shrout -----Original Message----- From: Tim Taubert [mailto:timtaubert@web.de] Sent: Monday, July 02, 2001 9:51 AM To: PHP Mailingliste Subject: RE: [PHP] mail function fails mh.. <?php if (mail("timtaubert@web.de", "Quote Request", "test")) { echo "Email sent!"; } else { echo "Email NOT sent!"; } ?> this worked successfully... don't have any other ideas.. bye tim --------------------------------------------------------------------- Tim Taubert | timtaubert@web.de | http://www.shogunat.com/rg/ --------------------------------------------------------------------- -----Original Message----- From: Shrout, Ryan [mailto:Rshrout@krauss-maffeicorp.com] Sent: Monday, July 02, 2001 3:30 PM To: PHP Mailingliste Subject: RE: [PHP] mail function fails I tried that in this format: if ( mail("bsmall@ikmc.com", "Quote Request", $message, "From: mail@somewhere.com\nX-Mailer: PHP/" . phpversion()) ) { echo "Email sent!"; } else { echo "Email NOT sent!"; } and still get the Email NOT sent and no emails go anywhere. Is there another solution? How about a way to get an error message of some kind? Ryan -----Original Message----- From: Tim Taubert [mailto:timtaubert@web.de] Sent: Monday, July 02, 2001 9:09 AM To: PHP Mailingliste Subject: RE: [PHP] mail function fails hey ryan try something like this mail("bsmall@ikmc.com", "Quote Request", $message, "From: mail@somewhere.com\nX-Mailer: PHP/" . phpversion()); hope this helps cya tim --------------------------------------------------------------------- Tim Taubert | timtaubert@web.de | http://www.shogunat.com/rg/ --------------------------------------------------------------------- -----Original Message----- From: Shrout, Ryan [mailto:Rshrout@krauss-maffeicorp.com] Sent: Monday, July 02, 2001 3:01 PM To: 'php-general@lists.php.net' Subject: [PHP] mail function fails I am having a problem with the PHP mail() function. Here is the code: if (mail ("bsmall@ikmc.com", "Quote Request", $message)) { echo "Email sent!"; } else { echo "Email NOT sent!"; } Everytime, I receive the Email NOT sent message and the email isn't sent. However, from the console on the same machine, I can run the mail command: mail bsmall@ikmc.com and send an email just fine. Any ideas as to what could be wrong? I am using the latest PHP version and am running Red Hat Linux 7.1 Ryan Shrout -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#55844) next »