unix 的 php.ini 中的 sendmail_path [电子邮件发件人的全名]
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22816248/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
sendmail_path in php.ini for unix [full name of email sender]
提问by Javad
I have a Unix base server and a php base website on it. I am trying to set full nameand email addressfor the sendmail_pathin php.ini.
When I set it as below (without name) it works fine
我有一个 Unix 基础服务器和一个基于 php 的网站。我正在尝试为php.ini 中的sendmail_path设置全名和电子邮件地址。
当我将其设置为如下(没有名称)时,它工作正常
sendmail_path = /usr/sbin/sendmail -t -i -f'[email protected]'
but if I try to add name as below it fails
但如果我尝试添加名称如下,它会失败
sendmail_path = /usr/sbin/sendmail -t -i -f'"Full Name" <[email protected]>'
You may suggest to use sendmail_from
instead but as I mentioned it's Unix server and whatever is set in sendmail_from
will be ignored. Does anybody know how to fix this issue?
您可能会建议sendmail_from
改用,但正如我提到的,它是 Unix 服务器,任何设置都sendmail_from
将被忽略。有谁知道如何解决这个问题?
Any help will be appreciated in advance.
任何帮助将提前表示赞赏。
回答by AnFi
Try the version below:
试试下面的版本:
sendmail_path = /usr/sbin/sendmail -t -i -F"Full Name" -f'[email protected]'
WARNING
It will work with "real sendmail" (sendmail provided by sendmail.org).
It maynot work with some "sendmail look alike" provided by other MTAs e.g. postfix, exim, ...
警告
它将与“真正的sendmail”(sendmail.org 提供的sendmail)一起使用。
它可能不适用于其他 MTA 提供的某些“sendmail 外观相似”,例如 postfix、exim ......