smtp - PhpMailer unable to send mails from localhost to Zoho -


i'm using phpmailer send email on form submission. have site (deployed previously) live , uses same email account (provided zoho) send emails, , still working on site. when developing old app on localhost, email working (last tested 6 months ago). since then, i've replaced machine, dev wamp environment new.

it's important repeat here same settings work on hosting/production server not on localhost. of posts i've seen talk vice versa. (edit: noticed production server runs php 5.4.35 while localhost 5.6.25)

when try sending emails localhost environment through same zoho email id (and same credentials), giving me this:

smtp error: failed connect server (0) fatal error: uncaught exception 'phpmailerexception' message 'smtp connect() failed.' in d:\wamp64\www\mynewapp\lib\phpmailer-master\class.phpmailer.php on line 1184 

here phpmailer settings:

$mail = new phpmailer(true);     $mail->issmtp();     $mail->smtpdebug = 2;     $mail->debugoutput = 'html';     $mail->host = "smtp.zoho.com";     $mail->port =   465; // 587;  //465;     $mail->smtpsecure = 'ssl'; //'tls';  //'ssl'     $mail->smtpauth = true; 

i not sure if i've missed setting on new wamp instance, afaics, same production server email working. config: win10 machine wamp (php v5.6.25 + apache 2.4.23)


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -