zend-mail
zend-mail copied to clipboard
Transport service factory
There is missing service factory for mail transports like same in db and other components.
production config/autoload/local.php
return [
'mail' => [
'transport' => [
'type' => 'smtp',
'options' => [
'host' => 'smtp.example.com',
'connection_class' => 'login',
'connection_config' => [
'username' => '[email protected]',
'password' => 'xxxxxxxx',
'ssl' => 'tls'
],
],
],
],
];
testing / dev config/autoload/local.php
return [
'mail' => [
'transport' => [
'type' => 'in-memory'
],
],
];
That is may look like https://github.com/autowp/zf-components/blob/master/src/Mail/Transport/TransportServiceFactory.php
This appears to be at least somewhat implemented in: https://github.com/zendframework/zend-mail/blob/master/src/Transport/Factory.php
This repository has been closed and moved to laminas/laminas-mail; a new issue has been opened at https://github.com/laminas/laminas-mail/issues/47.