The problem is I want to connect to yahoo mails's smtp server using stream_socket_client
.
$host = 'smtp.mail.yahoo.com';
$port = 587;
$errno = 0;
$errstr = '';
$smtp_conn = stream_socket_client(
'tls://'.$host . ":" . $port,
$errno,
$errstr,
30
);
and it gives the following error
Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in C:\xampp\htdocs\index.php on line 53
I used phpMailer first and it worked just fine, but I want to do this by myself.
How can I solve this problem? Thank you.