email - Could not connect to SMTP host PHP Mailer -


i'm using phpmailer send email. code.

require 'phpmailerautoload.php';  $mail = new phpmailer;  $mail->smtpdebug = 1; $mail->issmtp();                                       $mail->host = 'mail.distech.com.my';                     $mail->smtpauth = true;                                $mail->username = 'myemail';                   $mail->password = 'mypassword';                           $mail->smtpsecure = 'tls';                           $mail->port = 587;  

i've used code on computer , works. email been send. however, when run code on friends computer, error appears.

the error :

2015-06-19 08:42:12 client -> server: ehlo 192.168.1.20  2015-06-19 08:42:12 client -> server: starttls  warning: stream_socket_enable_crypto() [function.stream-socket-enable-crypto]: ssl: operation completed successfully. in c:\xampp\htdocs\ehars\phpmailer\class.smtp.php on line 344  2015-06-19 08:42:12 smtp error: not connect smtp host.  2015-06-19 08:42:12 client -> server: quit  notice: fwrite() [function.fwrite]: send of 6 bytes failed errno=10054 existing connection forcibly closed remote host. in c:\xampp\htdocs\ehars\phpmailer\class.smtp.php on line 937  2015-06-19 08:42:12 smtp error: quit command failed:  2015-06-19 08:42:12 smtp connect() failed. https://github.com/phpmailer/phpmailer/wiki/troubleshooting message not sent.mailer error: smtp connect() failed. https://github.com/phpmailer/phpmailer/wiki/troubleshooting 

what problem new phpmailer. have tried pinging mail.distech.com.my on both computer , both works fine. please me thank you.

you can try upgrading php version.

as enable below line in php.ini file , restart apche server.

; extension=php_openssl.dll 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -