Commit 5a584c0b by Paul Klimov

Creating transport at 'yii\swiftmailer\Mailer' fixed to track possible "__call".

parent a38c280a
......@@ -145,7 +145,7 @@ class Mailer extends BaseMailer
$transport->$name = $value;
} else {
$setter = 'set' . $name;
if (method_exists($transport, $setter)) {
if (method_exists($transport, $setter) || method_exists($transport, '__call')) {
$transport->$setter($value);
} else {
throw new InvalidConfigException('Setting unknown property: ' . get_class($transport) . '::' . $name);
......
......@@ -53,6 +53,8 @@ class MailerTest extends VendorTestCase
$transportConfig = [
'class' => 'Swift_SmtpTransport',
'host' => 'localhost',
'username' => 'username',
'password' => 'password',
];
$mailer->setTransport($transportConfig);
$transport = $mailer->getTransport();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment