I use Mageplaza SMTP extension to setup the SMTP. When testing the connection, it popped up the follow error. I have already tried some solution online, like trying to modify abstract.php file. There is also an answer saying it maybe caused by shared host, since I am also hosting the website in shared host. But I contacted bluehost, they said my MX is pointing to Google. They won't block anything. Any ideas on this issue? php version: 7.1 Magento 2 version: 2.3.2
You need to try this.
open this file :
arround line no 267.
$this->_socket = @stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);
comment above line and add this code below that line.
$stream_context = stream_context_create(array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) )); $this->_socket = stream_socket_client( $remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION, STREAM_CLIENT_CONNECT, $stream_context );
Use Magepal Extension & ask me if it is not working.