mardi 17 décembre 2019

Emails not sent from laravel commands

Emails not sent from command. Here is command code.

public function handle()
{
  Mail::to('example@abc.com')->send(new EmailNotification());
}

However, when I try to send mail from route mail is sent.

Route::get('test_mail', function(){
   Mail::to('example@abc.com')->send(new EmailNotification());
});

How can I send email from command line? When I run

php artisan send:emailNotification 

it shows no errors



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire