2

I have am using an SMTP mail server. When I register a new user, I recieve the following error message:

An error occurred
Could not open socket
Additional information:
Zend\Mail\Protocol\Exception\RuntimeException
File:
C:\wamp\www\zendtest\vendor\zendframework\zend-mail\src\Protocol\AbstractProtocol.php:209
Message:
Could not open socket

Code

<?php
return array(
    'mail' => array(
        'transport' => array(
            'options' => array(
                'host' => 'smtp.gmail.com',
                'connection_class' => 'login',
                'port' => '465',
                'connection_config' => array(
                    'username' => 'varinderkumar.dx@gmail.com',
                    'password' => '********',
                    'ssl' => 'ssl'
                ) ,
            ) ,
        ) ,
    ) ,
);
?>

What should I do?

Mr. Polywhirl
  • 42,981
  • 12
  • 84
  • 132
Varinder
  • 202
  • 5
  • 16
  • Possible duplicate of [How to fix "could not open socket in Zend Mail (Zend Framework 2)](http://stackoverflow.com/questions/28433816/how-to-fix-could-not-open-socket-in-zend-mail-zend-framework-2) – Mr. Polywhirl Dec 17 '15 at 13:08
  • You can delete your comment above, I included your code in your question. – Mr. Polywhirl Dec 18 '15 at 13:19

2 Answers2

0

go to wamp->php->php.ini open this file and find ssl.dll after that remove ; symbol from starting of line. then save the file and restart the wamp. This is working for me.

Varinder
  • 202
  • 5
  • 16
0

For cPanel: Try disabling WHM >> Secuirty >> SMTP Restrictions.

Seff
  • 1,546
  • 1
  • 17
  • 19