PHP mail() on Windows: no errors, the email isn't sent

浪尽此生 提交于 2019-12-03 15:58:48

I've gotten it to work eventually. The problem was that PHP had a bug in parsing .ini files with spaces in the path (for sendmail). It was fixed in version 5.3.0, but the manual had no info on this.

So, yes, it is possible to use sendmail with PHP on Windows :D.

Thank you all for your time!

Make sure you have SMTP Service running on your local machine and that SMTP Port(25) is opened.

Have a check on the services (Run->services.msc) and look for Send Mail Transfer

If you cannot find SMTP on the services list, you must install it: To add, Run->appwiz.cpl->Add Remove Windows components->IIS->Details->SMTP

I am not sure if this helps or not, what i used to do in these scenarios was to setup , outlook on my machine and have it set to get emails from the pop every 5 mins or so, that way my ip/machine was authenticated against the pop and if i just set the :

SMTP = localhost
smtp_port = 25

in php.ini , the mail function worked fine. So in your case just set your outlook to work with a pop and use that smtp in php.ini and hopefully it should work. I havent tested this will GMail though.

P.S. Please don't suggest PHPMailer and the like, because I have to use the mail() function. That's how Elgg works.

...unless you're using a plugin that changes this behaviour:
http://community.elgg.org/pg/plugins/costelloc/read/16498/phpmailer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!