mail function is not working in localhost server

后端 未结 2 1416
鱼传尺愫
鱼传尺愫 2021-01-18 07:52

I am on my localhost server. I am using this code below, but I never received the email.



        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-18 08:11

    Make sure that the mailserver is configured correctly in the php.ini file.

    comment out these lines like this in php.ini file and restart the Apache server.

    /*[mail function]
    ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
    ; SMTP = localhost
    ; smtp_port = 25
    */
    
    /*; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = postmaster@localhost
    */
    

提交回复
热议问题