Can anyone help me with Laravel Mail function?
I changed config/mail.php file to
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'mail.concept.kz'),
'port' => env('MAIL_PORT', 25),
'from' => ['address' => 'support@concept.kz', 'name' => 'asdf'],
'encryption' => env('MAIL_ENCRYPTION', null),
'username' => env('support@concept.kz'),
'password' => env('mypassword'),
'sendmail' => '/usr/sbin/sendmail -bs',
This is my code in controller
Mail::raw($messageBody, function($message) {
$message->from('support@concept.kz', 'Learning Laravel');
$message->to('receiver@mail.ru');
});
if (Mail::failures()) {
echo 'FAILED';
}
return redirect()->back();
I made the same changes to .env file, but nothing happens. Can anyone give me advice what to do? Am I doing something wrong?