Failed to connect to mailserver at “localhost” port 25

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

    On windows, nearly all AMPP (Apache,MySQL,PHP,PHPmyAdmin) packages don't include a mail server (but nearly all naked linuxes do have!). So, when using PHP under windows, you need to setup a mail server!

    Imo the best and most simple tool ist this: http://smtp4dev.codeplex.com/

    SMTP4Dev is a simple one-file mail server tool that does collect the mails it send (so it does not really sends mail, it just keeps them for development). Perfect tool.

提交回复
热议问题