Answer the question
In order to leave comments, you need to log in
How to set up mailer to work via mail() and not swiftmailer in yii2?
What should be done for this?
Here is my code and it doesn't work:
Yii::$app->mailer->compose()
->setTo('[email protected]')
->setFrom('[email protected]')
->setSubject('Invite')
->setTextBody('Hello!')
->send();
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => false,
],
Answer the question
In order to leave comments, you need to log in
Off the dock says that
www.yiiframework.com/doc-2.0/yii-swiftmailer-maile...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question