|
|
|
@ -19,7 +19,7 @@ use yii\mail\BaseMailer;
|
|
|
|
|
* ~~~ |
|
|
|
|
* 'components' => [ |
|
|
|
|
* ... |
|
|
|
|
* 'mail' => [ |
|
|
|
|
* 'mailer' => [ |
|
|
|
|
* 'class' => 'yii\swiftmailer\Mailer', |
|
|
|
|
* 'transport' => [ |
|
|
|
|
* 'class' => 'Swift_SmtpTransport', |
|
|
|
@ -57,7 +57,7 @@ use yii\mail\BaseMailer;
|
|
|
|
|
* To send an email, you may use the following code: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* Yii::$app->mail->compose('contact/html', ['contactForm' => $form]) |
|
|
|
|
* Yii::$app->mailer->compose('contact/html', ['contactForm' => $form]) |
|
|
|
|
* ->setFrom('from@domain.com') |
|
|
|
|
* ->setTo($form->email) |
|
|
|
|
* ->setSubject($form->subject) |
|
|
|
|