Skip to main content
Tutorial Free

Quickly test email sending with... artisan tinker!

October 20, 2016
1 min read
Artisan tinker is a wonderful command-line helper to run any simple code. I was often using it to test simple things like if there is any data in Eloquent model or something like that. But today I realised it's much more powerful. So when faced the task of testing if Mailgun is working for one of the clients - here's how it looked.
  • SSH into the server
  • Run php artisan tinker
  • Run Laravel code - Mail::send() with any simple view
This is how it looked in "real life". artisan tinker So the attempt failed - apparently I had unactivated account. After doing the activation, I ran the command again, and there we go. artisan tinker email And received an email to the inbox with a beautiful "Be right back" 503 template. artisan tinker email That's it, a quick tip - hopefully helpful!

Enjoyed This Tutorial?

Get access to all premium tutorials, video and text courses, and exclusive Laravel resources. Join our community of 10,000+ developers.

Comments & Discussion

No comments yet…

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.