I'm developing a site using Laravel 4 and would like to send myself ad-hoc emails during testing, but it seems like the only way to send emails is to go through a view.
Is it possible to do something like this?
Mail::queue('This is the body of my email', $data, function($message)
{
$message->to('foo@example.com', 'John Smith')->subject('This is my subject');
});
Best Solution
As mentioned in an answer on Laravel mail: pass string instead of view, you can do this (code copied verbatim from Jarek's answer):
You can also use an empty view, by putting this into app/views/email/blank.blade.php
And nothing else. Then you code
And this allows you to send custom blank emails from different parts of your application without having to create different views for each one.