yii2无法使用2个可能的身份验证器在SMTP服务器上使用用户名进行身份验证

时间:2016-05-30 13:38:34

标签: php yii yii2 swiftmailer

我在yii2中使用swift邮件程序,我正在使用正确的smtp设置仍然无法发送电子邮件。 我收到此错误 - 无法使用用户名“example@example.com”在SMTP服务器上使用2个可能的身份验证器进行身份验证

我的快速邮件设置是:

'mailer' => [
        'class' => 'yii\swiftmailer\Mailer',
        'useFileTransport' => false,
        'transport' => [
            'class' => 'Swift_SmtpTransport',
            'host' => 'myHostName',
            'username' => 'myUsername',
            'password' => 'myPassword',
            'port' => '465',
            'encryption' => 'ssl',
        ],
    ],

我在网上搜索了很多但没有找到解决方案,有人建议通过制作'useFileTransport'=>是的,但它仍然没有用。

0 个答案:

没有答案