<?php /* * This file is part of SwiftMailer. * (c) 2004-2009 Chris Corbyn * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require __DIR__./classes/Swift.php
本文实例讲述了Yii2使用swiftmailer发送邮件的方法。分享给大家供大家参考,具体如下:
'mail' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => 'backend/mail',
'useFileTransport' => false,//set this property to false to send mails to real email addresses