Yii2 Mailer with Gmail

0
4451
views

In this case, i use yii2 advanced.

Update common/config/main.php

Update your username, and password.

For php 5.6, to handle stream_socket_enable_crypto

If common/config/main-local.php is exist, try comment out the all configuration in mailer.

To use the mailer, use the code below

But, we must turn on Access for less secure apps, check this link.

Then try to send the email. Let me know if have a problem. Thanks.

LEAVE A REPLY

Please enter your name here
Please enter your comment!