PHP Mail()在Mac OS X Leopard上使用Sendmail(10.5.8)

前端之家收集整理的这篇文章主要介绍了PHP Mail()在Mac OS X Leopard上使用Sendmail(10.5.8)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在努力获得一个真正基本的 PHP函数,我的iMac,PHP mail()函数.

我已经使用了无数次,尽管在Windows平台上,现在我试图让它在Mac上运行.

我已经安装了XAMPP v1.01,可能是因为我当时不了解任何更好的东西,我以为这一切都可以正常工作,因为这是应该做的. (或者所以我想).

我尝试了以下各页的说明无效:

> http://blog.rajatpandit.com/2009/03/15/php-mail-and-osx-leopard/
> http://theandystratton.com/2009/fix-phps-mail-function-after-latest-os-x-leopard-update
> http://forums.oreilly.com/index.php?showtopic=5243&mode=threaded&pid=14721
> http://jspr.tndy.me/2008/05/php-mail-and-osx-leopard/

首先我没有一个条目:
MAILSERVER = -YES-在我的/ etc / hostconfig中,所以我创建了它.

我在PHP.ini中添加了sendmail的完整路径:sendmail_path =“/usr/sbin / sendmail -t -i”

我明白我不需要在/etc/postfix/main.cf中设置一个myhostname变量,因为我只是计划发送邮件没有收到它. (请注意,我也尝试使用此设置启用!)

我已经开始后缀,然后尝试运行脚本,但是脚本只是处理没有错误消息,它基本上看起来好像它的工作,但没有发生(我已经三重检查脚本的代码).

我注意到一些人的解决方案甚至没有提到必须启动postfix守护进程才能让PHP mail()函数工作.

任何想法或事情给我试试吗?

如果您需要更多信息,请问.

P.

从这里贴一个答案: http://macosx.com/forums/unix-x11/19819-sendmail-not-working.html

听起来像您发布的日志条目的问题.

此外,该帖子的作者建议您在系统更新后再次执行此操作,因此“修复权限”不是您想要的….并且可能是您想要的OPPOSITE.

The most common problem with sendmail on OS X is just a permission problem,and one which will show up after installing most packages from Software Update. Check /var/log/mail.log and see if it’s complaining a lot about a group writable directory. If that’s the case,then the problem is that the root directory is group writable. That’s easily fixed with a quick “sudo chmod g-x /”. Then sendmail should be able to start properly,and I think it can be invoked by typing “/usr/sbin/sendmail -bd -q1h”. Again,if all else fails,reboot.

原文链接:https://www.f2er.com/php/138667.html

猜你在找的PHP相关文章