Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yii 2 mailer dont send mail and dont display errors #96

Open
nnpa opened this issue Oct 7, 2022 · 0 comments
Open

Yii 2 mailer dont send mail and dont display errors #96

nnpa opened this issue Oct 7, 2022 · 0 comments

Comments

@nnpa
Copy link

nnpa commented Oct 7, 2022

config
'components' => [
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.send-box.ru',
'username' => '[email protected]',
'password' => 'password',
'port' => '587',
'encryption' => 'tls',
],
],

    Yii::$app->mailer->compose()
    ->setFrom('[email protected]')
    ->setTo('[email protected]')
    ->setSubject('Тема сообщения')
    ->setTextBody('Текст сообщения')
    ->setHtmlBody('<b>текст сообщения в формате HTML</b>')
    ->send();

code return true witout errors (when config has errors)
mail not send
Why?

@samdark samdark transferred this issue from yiisoft/yii2 Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant