Hello,
i have a little problem with smtp mailer. The config for smtp works on xampp, but not on my server.
app.php
'EmailTransport' => [
'default' => [
'className' => 'Smtp',
/*
* The keys host, port, timeout, username, password, client and tls
* are used in SMTP transports
*/
'host' => 'example.com',
'port' => 587,
'timeout' => 30,
'username' => "noreply@example.com",
'password' => "password",
'client' => null,
'tls' => true,
'starttls' => true,
'context'=>array('ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)),
],
],
'Email' => [
'default' => [
'transport' => 'default',
'from' => 'noreply@afjesproche.de',
/*
* Will by default be set to config value of App.encoding, if that exists otherwise to UTF-8.
*/
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
],
],
Error:
Mailer transport smtp is not available.
BadMethodCallException
/var/www/vendor/cakephp/cakephp/src/Mailer/TransportRegistry.php[Toggle Arguments](https://example.com/survey/create#)
||` * @throws \BadMethodCallException`|
| --- | --- |
||` */`|
||` protected function _throwMissingClassError(string $class, ?string $plugin): void`|
||` {`|
||` throw new BadMethodCallException(sprintf('Mailer transport %s is not available.', $class));`|
||` }`|
||``|
||` /**`|
||` * Create the mailer transport instance.`|
Where is the fault?
Thanks.