Tuesday, 15 June 2010

Warning: stream_socket_enable_crypto(): this stream does not support SSL/crypto in C:\xampp\htdocs\12work\class.smtp.php on line 197 -



Warning: stream_socket_enable_crypto(): this stream does not support SSL/crypto in C:\xampp\htdocs\12work\class.smtp.php on line 197 -

i using xampp , when trying send email through localhost next warning:

warning: stream_socket_enable_crypto(): stream not back upwards ssl/crypto in c:\xampp\htdocs\12work\class.smtp.php on line 197

here code:

$mail = new phpmailer(); $mail->issmtp(); // set mailer utilize smtp $mail->host = "smtp.gmail.com"; // specify main , backup server $mail->smtpauth = true; $mail->port = 25; $mail->smtpsecure = "tls"; $mail->smtpauth = true; // turn on smtp authentication $mail->username = "sheikh.abm@gmail.com"; // smtp username $mail->password = "mypassword"; // smtp password $mail->from = "sheikh.abm@gmail.com"; //do not false header. $mail->fromname = "mailman"; $mail->addaddress("sheikh.abm@gmail.com"); // email on want send mail service $mail->ishtml(true); $mail->subject = "just test"; $mail->body = "hello. testing <b>php mailer.</b>"; if(!$mail->send()) { echo $mail->errorinfo; }else{ echo "email sent"; }

update version of php

or if think, php should back upwards it:

we need enable php openssl module:

in php.ini search line

; extension=php_openssl.dll

and remove ; becomes:

extension=php_openssl.dll

then save & restart & enjoy.

php

No comments:

Post a Comment