Sending emails with WAMP

后端 未结 6 1899
无人共我
无人共我 2020-12-03 00:17

I use the latest WAMP and I get this when I try to send emails:

Warning: mail() [function.mail]: Failed to connect to mailserver at \"localhost\" port 25, ve         


        
6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-03 00:41

    here is another solution - WAMP send Mail using SMTP localhost


    KEEP IN MIND, everytime, after You change php.ini,

    you must restart wamp (! ! !)

    p.s. in php.ini, i have used:

    SMTP = localhost 
    smtp_port = 25 
    sendmail_from = your_user@gmail.com
    

    or if oyu cant edit php.ini, try to insert these lines in your php script.

    ini_set("SMTP", "localhost");
    ini_set("smtp_port", "25");
    ini_set("sendmail_from", "your_user@gmail.com");
    

提交回复
热议问题