php mail function not working

痴心易碎 提交于 2019-12-06 13:58:56
Rhys

For me, adding the following code in the calling file did the trick

// xampp code fix      
ini_set( 'sendmail_from', "myself@my.com" ); \\ My usual e-mail address
ini_set( 'SMTP', "mail.bigpond.com" );  \\ My usual sender
ini_set( 'smtp_port', 25 );

I have used Fake Sendmail to successfully send emails from my localhost running WAMP.

Try following the instructions here to get it up and running.

Well do you have a mailserver configured on localhost? Otherwise to use mail you will probably have to use you internets provider smtp servers instead of localhost to connect.

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