PHPMailer to use Gmail as SMTP server.Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host

前端 未结 4 1870
你的背包
你的背包 2020-12-01 18:30

i am trying to use phpMailer to send confirmation messages to users via email. my code is this:



        
4条回答
  •  天命终不由人
    2020-12-01 19:04

    From here

    2) Comment out the following lines of code in class.phpmailer.php

    /*
    if(strstr($hosts[$index], ":"))
    list($host, $port) = explode(":",
    $hosts[$index]); else 
    */
    

    Try this if you haven't already.

提交回复
热议问题