【发布时间】:2017-05-14 14:25:31
【问题描述】:
我正在关注Sendgrid laravel integration using smtp 发送电子邮件。
我按照文档说的做了,所有凭据都与我的 sendgrid 凭据相同。
但是每当我尝试使用发送电子邮件时,
Mail::send('mails.demo', $data, function($message)
{
$message->to('test@gmail.com', 'test')->subject('This is a test mail!');
});
错误显示为
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "550", with message "550 Unauthenticated senders not allowed
"
我可以使用 Telnet guide 使用 sendgrid 测试发送电子邮件,效果很好。
【问题讨论】:
-
您的“发件人”地址应与 conf/mail.php 中的 smtp 配置相匹配。
-
你能发布你的配置文件吗?
-
您使用的“发件人”地址是否与在 sendgrid 注册的“发件人”地址匹配?
-
@yivi 我使用的是通过电子邮件验证的(我们只有一封电子邮件)
标签: php laravel email smtp sendgrid