I sent email through php function mail - false.
Open putty ->
php -r ‘mail(“***@gmail.com”,“test”,“jjjjjjjj”;’
sh: /usr/sbin/sendmail: No such file or directory
SENDMAIL not installed ?
CentOs 5
any advice please.
I sent email through php function mail - false.
Open putty ->
php -r ‘mail(“***@gmail.com”,“test”,“jjjjjjjj”;’
sh: /usr/sbin/sendmail: No such file or directory
SENDMAIL not installed ?
CentOs 5
any advice please.
You need to install sendmail in your server and then your php script will work:
yum install sendmail
The same
[root]# yum install sendmail
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: ftp-stud.fht-esslingen.de
* updates: ftp-stud.fht-esslingen.de
* addons: ftp-stud.fht-esslingen.de
* extras: ftp-stud.fht-esslingen.de
base 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Parsing package install arguments
Package sendmail - 8.13.8-2.el5.i386 is already installed.
Nothing to do
# php -r 'mail("8888@gmail.com","test","jjjjjjjj");'
sh: /usr/sbin/sendmail: No such file or directory
Run the command
rpm -ql sendmail-8.13.8-2.el5
to find where sendmail is installed.
not work (
[root@ sbin]# rpm -ql sendmail-8.13.8-2.el5
/etc/mail
/etc/mail/Makefile
/etc/mail/access
/etc/mail/domaintable
/etc/mail/helpfile
/etc/mail/local-host-names
/etc/mail/mailertable
/etc/mail/sendmail.cf
/etc/mail/sendmail.mc
/etc/mail/submit.cf
/etc/mail/submit.mc
/etc/mail/trusted-users
/etc/mail/virtusertable
/etc/pam.d/smtp.sendmail
/etc/rc.d/init.d/sendmail
/etc/smrsh
/etc/sysconfig/sendmail
/usr/bin/hoststat
/usr/bin/mailq.sendmail
/usr/bin/makemap
/usr/bin/newaliases.sendmail
/usr/bin/purgestat
/usr/bin/rmail.sendmail
/usr/lib/sasl2/Sendmail.conf
/usr/lib/sendmail.sendmail
/usr/sbin/mailstats
/usr/sbin/makemap
/usr/sbin/praliases
/usr/sbin/sendmail.sendmail
/usr/sbin/smrsh
/usr/share/man/man1/mailq.sendmail.1.gz
/usr/share/man/man1/newaliases.sendmail.1.gz
/usr/share/man/man5/aliases.sendmail.5.gz
/usr/share/man/man8/mailstats.8.gz
/usr/share/man/man8/makemap.8.gz
/usr/share/man/man8/praliases.8.gz
/usr/share/man/man8/rmail.8.gz
/usr/share/man/man8/sendmail.sendmail.8.gz
/usr/share/man/man8/smrsh.8.gz
/var/log/mail
/var/log/mail/statistics
/var/spool/clientmqueue
/var/spool/mqueue
sh: /usr/sbin/sendmail: No such file or directory
may be this problem :
Do you assume that was not loaded there at all.
I would recommend you reinstall whole script not only small parts of it.
Hope that helps
I would recommend you reinstall whole script not only small parts of it.
how ? please step by step shell commands.
You can remove sendmail from your server:
yum remove sendmail
and then install it again:
yum install sendmail
or you can follow the instruction which can be found at http://www.sendmail.org/~ca/email/doc8.12/op-sh-1.html#sh-1 and compile/install sendmail manually.
SergHZ thanks, I solved the problem
php mail work !
Glad to know that php mail works now.
Thanks for the help, Serg!
Regards,
DK
If you don’t want to depend on yum for packages which don’t need others (don’t have dependencies) just remove them with rpm via
rpm -e package_name
and than re-install them via
rpm -ivh package_name
Thanks