Skip to content

Instantly share code, notes, and snippets.

@emmanuelbarturen
Last active July 25, 2020 18:59
Show Gist options
  • Save emmanuelbarturen/e0b5ff6bf4a7a49bd73e2606cee3dfdb to your computer and use it in GitHub Desktop.
Save emmanuelbarturen/e0b5ff6bf4a7a49bd73e2606cee3dfdb to your computer and use it in GitHub Desktop.
check if mail service working correctly from artisan
# ssh into the server
# go to the laravel project
$ php artisan tinker
# Example 1 , from view
$ Mail::send('errors.401',[],function($message){$message->to('emmanuelbarturen@gmail.com')->subject('this works!');});
# Example 2, plain text
Mail::raw('Hi Mail Service',function($message){$message->to('emmanuelbarturen@gmail.com')->subject('this works!');});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment