Failed to connect to mailserver at “localhost” port 25

前端 未结 8 1107
日久生厌
日久生厌 2020-11-22 10:34

I keep getting this error when I try to send an e-mail in PHP:

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


        
8条回答
  •  太阳男子
    2020-11-22 11:04

    php doesn't allow or think it as very difficult to send email from localhost but this issue will be solved if you upload the project to the server. and if you want to check if email sent or not on the local server then you have to download smtp4dev and install and run it. This will give you a message if your email sent successfully or there is an issue with your code.

提交回复
热议问题