admin 发表于 2016-10-19 17:38:28

discuz发邮件API(使用sendmail命令发送)

此方式需要服务器安装postfix,可以在Linux系统下直接使用sendmail命令查看是否安装
注:send-mail: fatal: parameter inet_interfaces: no local interface found for ::1 错误解决:vi/etc/postfix/main.cf

发现配置为:

inet_interfaces = localhost

inet_protocols = all

改成:

inet_interfaces = all

inet_protocols = all


重新启动

service postfix start

支持同时向多个邮件地址发送


include_once libfile('function/mail');

$sendto = "<js_mawentao@163.com>,<didilangbi@163.com>";

sendmail($sendto,"测试邮件","休息休息","xxx@163.com");

出问题查看日志
/var/log/maillog








页: [1]
查看完整版本: discuz发邮件API(使用sendmail命令发送)