laravel 邮件Expected response code 250 but got code "530"with message "530 Authentication required


laravel 发送邮件抛出如下错误
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "530", with message "530 Authentication required
"
错误提示的意思是邮箱服务器未通过,但我的账号密码是正确的啊。求支援。----------mail.php 配置文件为:

'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.sina.com'),
'port' => env('MAIL_PORT', 25),
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'xxxx@sina.com'),
'name' => env('MAIL_FROM_NAME', '发件人'),
],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',

'paths' => [
resource_path('views/vendor/mail'),
],
],

发送邮件的方法为
public static function sendEmailTest(){
$uid = 'uid123';
$code = 'activeCode';
$data = ['uid'=>$uid, 'activationcode'=>$code];
Mail::send('email/activemail', $data, function($message)
{
$message->to('xxx@qq.com')->subject('欢迎注册我们的网站,请激活您的账号!');
});
}
求大神支援。。。


点赞 取消点赞 收藏 取消收藏

<< 上一篇: 表单验证类一次返回所有错误 对于前台不能区分怎么办

>> 下一篇: Qeury 被执行两次