0

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 enter image description here

0

Reference Link

You need to try this.

open this file : vendor\magento\zendframework1\library\Zend\Mail\Protocol\Abstract.php

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 
 );
| improve this answer | |
  • thank you for the reply. But it is still not working. Do you think it is because of the php version? I am using php 7.1 – lancwl Sep 8 '19 at 2:46
0

The issue is fixed by changing the SMTP host to bluehost (host provider). Looks like the site is not using the gmail host which is weird.

| improve this answer | |
0

Use Magepal Extension & ask me if it is not working.

https://github.com/magepal/magento2-gmail-smtp-app

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.