Skip to content

OpenSSL error when trying to establish a connection #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ben1985614 opened this issue May 22, 2025 · 0 comments
Closed

OpenSSL error when trying to establish a connection #581

ben1985614 opened this issue May 22, 2025 · 0 comments

Comments

@ben1985614
Copy link

Hello,

We see the following error in the PHP log during establishing a connection:

[22-May-2025 13:35:03 Europe/Berlin] PHP Warning:  stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A00010B:SSL routines::wrong version number in C:\phpimap\vendor\webklex\php-imap\src\Connection\Protocols\Protocol.php on line 244
[22-May-2025 13:35:03 Europe/Berlin] PHP Warning:  stream_socket_client(): Failed to enable crypto in C:\phpimap\vendor\webklex\php-imap\src\Connection\Protocols\Protocol.php on line 244
[22-May-2025 13:35:03 Europe/Berlin] PHP Warning:  stream_socket_client(): Unable to connect to tls://xxxxxx.goserver.host:587 (Unknown error) in C:\phpimap\vendor\webklex\php-imap\src\Connection\Protocols\Protocol.php on line 244

Here is our PHP code:

$imapClientManager = new ClientManager($options = []);
$imapClient = $imapClientManager->account('xxxxxxxx');

$vpIMAPClient = $imapClientManager->make([
	'host'          => 'xxxxxx.goserver.host',
	'port'          => 587,
	'encryption'    => 'tls',
	'validate_cert' => false,
	'username'      => '[email protected]',
	'password'      => 'xxxxxxx',
	'protocol'      => 'imap'
]);

try {
	$imapClient->connect();
} catch (Exception $e) {
	print_r($e);
}

We're using OpenSSL 3.5.0.

Can you please tell us what's causing this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant