Failed to connect to mailserver at “localhost” port 25

前端 未结 8 1108
日久生厌
日久生厌 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:00

    For sending mails using php mail function is used. But mail function requires SMTP server for sending emails. we need to mention SMTP host and SMTP port in php.ini file. Upon successful configuration of SMTP server mails will be sent successfully sent through php scripts.

提交回复
热议问题