利用yii 2框架发送电子邮件,具体步骤如下所示:1、configweb.php中开启邮箱配置mailer => [class => yiiswiftmailerMailer, send all mails to a