Laravel - Sendgrid smtp error “550 Unauthenticated senders not allowed”

风流意气都作罢 提交于 2019-12-11 05:49:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!