cms icon indicating copy to clipboard operation
cms copied to clipboard

[4.x]: Update to Craft 4 Send email. OpenSSL Error Message: 0A00010B

Open ivesho opened this issue 2 years ago • 3 comments

What happened?

Description

#12387

Hi, I tried again, this time I got different error code. image

I using OpenSSL s_client commands to test. command: openssl s_client -connect 10.40.100.234:465 Got same error code. image

but this command is successful command: openssl s_client -starttls smtp -connect 10.40.100.234:465 image image

Application Info: image

Sorry, I don't know if these messages are helpful.

Thank you.

Craft CMS version

Craft Solo 4.5.2

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

ivesho avatar Sep 07 '23 01:09 ivesho

Hi, thanks for getting in touch.

Looking through this and #12387 and what has already been tried, I wonder if specifying the accepted encryption method would help. Could you give this a go for testing purposes? In app.php

'components' => [
    'mailer' => function() {
        $mailer = Craft::createObject(App::mailerConfig());
        $stream = $mailer->getTransport()->getStream();
        $stream->setStreamOptions([
            'ssl' => [
                'crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
            ]
        ]);
        return $mailer;
    },
],

Various options for the crypto_method are listed, e.g. here: https://www.php.net/manual/en/function.stream-socket-enable-crypto.php and end with _CLIENT

i-just avatar Sep 11 '23 10:09 i-just

Thanks for your help!

I trid all crypto_method , got the same error message. I asked the email server administrator about the relevant records, they had received our request, but could not create the TLS handshake.

ivesho avatar Sep 12 '23 06:09 ivesho

@ivesho can you connect to any other SMTP server on the same box you’re getting that error on?

If not, that would indicate something misconfigured on the box Craft is installed on (openssl/tls/ssl/etc.).

If you can connect to another server, that would indicate something similarly misconfigured on the mail server side (and the logs from the server administrator would be necessary to debug).

angrybrad avatar Sep 20 '23 15:09 angrybrad