I tried to program my advanced app to send email.
Initially, I tried
But it failed to send. Then I switched to
And it sent without any issue.
What is the inherent difference between this two? The official Yii2 Guide uses mailer instead of mail.