Answer the question
In order to leave comments, you need to log in
How to properly use sending emails on Laravel?
Good afternoon!
I decided to use Laravel tools to send emails to e-mail using SMTP. But I've run into a problem that I can't solve.
Email sending code:
$subject = ($act == 0) ? trans('backend/users.activation_off_subject') : trans('backend/users.activation_on_subject');
$message = ($act == 0) ? trans('backend/users.activation_off_message') : trans('backend/users.activation_on_message');
$from = Settings::first()->email;
$mail = $user->email;
Mail::raw($message, function($mess) use ($from, $mail, $subject) {
$mess->from($from, 'Test');
$mess->to($mail)->subject($subject);
});
Whoops, looks like something went wrong.
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 220 but got code 503, with message 503 Bad sequence of commands
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question