Answer the question
In order to leave comments, you need to log in
Why does swiftmailer duplicate sent email to username's address?
Config:
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.gmail.com',
'username' => '******@gmail.com',
'password' => '*****',
'port' => '587',
'encryption' => 'tls',
],
],
Yii::$app->mailer->compose()
->setFrom('[email protected]')
->setTo($email)
->setSubject('2')
->setHtmlBody('<b>2</b>')
->send();
->setFrom('[email protected]')
'username' => '[email protected]',
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question