问题
I am following Sendgrid laravel integration using smtp to send email.
I did as the documentation says, all credentials are same as my sendgrid credentials.
But whenever I try to send email using,
Mail::send('mails.demo', $data, function($message)
{
$message->to('test@gmail.com', 'test')->subject('This is a test mail!');
});
It shows error as
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 250 but got code "550", with message "550 Unauthenticated senders not allowed
"
I can send email using sendgrid test using Telnet guide, that works perfectly.
回答1:
"550 Unauthenticated senders not allowed"
explicitly means that you're system is not attempting to Authenticate. So you're not actually sending your credentials through. You should review your Laravel configuration, and make sure that it will send the AUTH
command before sending the MAIL FROM:
command.
来源:https://stackoverflow.com/questions/41393632/laravel-sendgrid-smtp-error-550-unauthenticated-senders-not-allowed