ArgumentCountError
Too few arguments to function Swift_Mime_SimpleMessage::__construct(), 0 passed in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php on line 48 and at least 4 expected
Additional info
Q
A
Yii version
2.0.32
PHP version
7.2.28
Operating system
yiisoft/yii2-swiftmailer
~2.1.0
ArgumentCountError: Too few arguments to function Swift_Mime_SimpleMessage::__construct(), 0 passed in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php on line 48 and at least 4 expected in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php:33
Stack trace:
#0 /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php(48): Swift_Mime_SimpleMessage->__construct()
#1 /var/www/vendor/yiisoft/yii2-swiftmailer/Message.php(434): Swift_Message->__construct()
#2 /var/www/vendor/yiisoft/yii2-swiftmailer/Message.php(66): yii\swiftmailer\Message->createSwiftMessage()
#3 /var/www/vendor/yiisoft/yii2-swiftmailer/Message.php(103): yii\swiftmailer\Message->getSwiftMessage()
#4 /var/www/backend/modules/autos/controllers/EmisionEspecialController.php(88): yii\swiftmailer\Message->setFrom('from@mail.com')
#5 [internal function]: backend\modules\autos\controllers\EmisionEspecialController->actionIndex()
#6 /var/www/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#7 /var/www/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#8 /var/www/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('', Array)
#9 /var/www/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('autos/emision-e...', Array)
#10 /var/www/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#11 /var/www/backend/web/index.php(18): yii\base\Application->run()
#12 {main}
What steps will reproduce the problem?
I update Yii to 2.0.32 and now I can't send emails
What is the expected result?
Send email.
What do you get instead?
ArgumentCountError Too few arguments to function Swift_Mime_SimpleMessage::__construct(), 0 passed in /var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php on line 48 and at least 4 expected
Additional info