DhErrorLogging icon indicating copy to clipboard operation
DhErrorLogging copied to clipboard

The mail not working

Open Rubarez opened this issue 8 years ago • 0 comments

I have this configuration. i used 2.0 version to zf2 2.5

'mail' => [ 'name' => 'mail', 'options' => [ /* * Subject Prepend Text / 'subject_prepend_text' => 'Error Log', / * Mail Options * @see Zend\Mail\Message / 'mail' => [ 'from' => '[email protected]', 'to' => '[email protected]', ], / * Transport * - sendmail => Zend\Mail\Transport\Sendmail, * - smtp => Zend\Mail\Transport\Smtp, * * Default transport is smtp */ 'transport' => [ 'type' => 'smtp',

                /*
                 * Transport Options
                 * @see Zend\Mail\Transport\SmtpOptions
                 */
                'options' => [
                    'host' => 'mail.mail.com',
                    'connection_class' => 'login',
                    'connection_config' => [
                        'username' => '[email protected]',
                        'password' => 'XXXXXXXX',
                        'ssl' => 'tls',
                        'port' => 587
                    ]
                ],
            ]
        ]
    ]

the error its:

Fatal error: Uncaught exception 'Zend\Log\Exception\InvalidArgumentException' with message 'Transport parameter of type array is invalid; must be of type Zend\Mail\Transport\TransportInterface' in C:\xampp\htdocs\xestur\vendor\zendframework\zend-log\src\Writer\Mail.php:109 Stack trace: #0 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\AbstractPluginManager.php(254): Zend\Log\Writer\Mail->__construct(Array) #1 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(638): Zend\ServiceManager\AbstractPluginManager->createFromInvokable('mail', 'mail') #2 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(597): Zend\ServiceManager\ServiceManager->doCreate('mail', 'mail') #3 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create(Array) #4 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\AbstractPluginManager.php(161): Zend\ServiceManager\Servi in C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 941

what happens?? thanks

Rubarez avatar Jul 12 '17 14:07 Rubarez