aschroder / Magento-SMTP-Pro-Email-Extension

Full SMTP and Gmail/Google Apps Email support for Magento
aschroder.com
333 stars 209 forks source link

TLS issue fix #284

Open cthamer opened 2 years ago

cthamer commented 2 years ago

The extension no longer works with email services (office365) that require TLS 1.2 or higher. It seems to be a problem with the Zend Mailer hard coding in only TLS 1.0 support.

The file httpdocs/lib/Zend/Mail/Protocol/Smtp.php has the following.

if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {

STREAM_CRYPTO_METHOD_TLS_CLIENT defaults to TLS1.

If you change that to

if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_ANY_CLIENT)) {

then a TLS1.2 connection can be established and all is well again

Johanoosmith commented 2 years ago

Yes, it's working for me.

Thanks

ADDISON74 commented 2 years ago

Please check this file from here:

https://github.com/Shardj/zf1-future/blob/master/library/Zend/Mail/Protocol/Smtp.php

STREAM_CRYPTO_METHOD_TLS_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT is a much better solution then STREAM_CRYPTO_METHOD_ANY_CLIENT because disables SSL protocol and leave only TLS.

I hope that in the coming months we will replace in OpenMage ZF1 inherited from Magento 1 and keep up with ZF1-Future which is an active project.

ProgrammerNomad commented 11 months ago

Yes, it's working for me.

Please check this file from here:

https://github.com/Shardj/zf1-future/blob/master/library/Zend/Mail/Protocol/Smtp.php

STREAM_CRYPTO_METHOD_TLS_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT is a much better solution then STREAM_CRYPTO_METHOD_ANY_CLIENT because disables SSL protocol and leave only TLS.

I hope that in the coming months we will replace in OpenMage ZF1 inherited from Magento 1 and keep up with ZF1-Future which is an active project.

Its perfect working with all :)