简体   繁体   English

无法执行:/ usr / sbin / sendmail

[英]Could not execute: /usr/sbin/sendmail

I'm trying to send mail through PHP Mailer. 我正在尝试通过PHP Mailer发送邮件。 Once i click on submit getting this error, 我点击提交后,收到此错误,

Could not execute: /usr/sbin/sendmail 无法执行:/ usr / sbin / sendmail

I googled it but couldn't find the right answer which will help me solving this. 我用谷歌搜索,但是找不到正确的答案,这将帮助我解决这个问题。 Please help me experts. 请高手帮帮我。 Thanks in advance. 提前致谢。

This suggests you're sending using the default transport, which uses PHP's mail() function, which in turn requires that you have a sendmail binary installed on your local machine. 这表明您正在使用默认传输进行发送,该默认传输使用了PHP的mail()函数,这反过来又要求您在本地计算机上安装了sendmail二进制文件。 If you don't have one, it can't work and will give you this error. 如果您没有,它将无法正常工作,并且会出现此错误。 Alternatively you may have one installed but in a different location, in which case you ned to update your php.ini file to point at it (see sendmail_path ) You need to either install a mail server such as postfix, or switch to the SMTP transport and use a remote server. 或者,您可能已经安装了一个php.ini文件,但在另一个位置,在这种情况下,您需要更新php.ini文件以指向它(请参见sendmail_path )。您需要安装邮件服务器(例如postfix),或切换到SMTP传输并使用远程服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM