DNABeast's avatar

Unable to build a Markdown mail from a test environment

I've made a new project. Created a Mailable with a markdown template. I can send the mail from a route.

Route::get('/demo', function () {
    \Mail::to('[email protected]')->send(new \App\Mail\DanMail());
});

But, when I call it from a test environment it tells me...

InvalidArgumentException: View [ **ENTIRE ESCAPED HTML OUTPUT FROM MY MARKDOWN**] not found.

The exception comes from FileViewFinder line 137. Why is the HTML getting sent to where a blade file should be requested?

0 likes
2 replies
DNABeast's avatar

Thanks for helping.

They're the defaults.

 'Mail' => Illuminate\Support\Facades\Mail::class,

And DanMail was made using the make command with the -m markdown option

php artisan make:mail DanMail -memails.danmail

I've published the mail stuff. I notice in the local environ that it's looking for /resources/views/vendor/mail/html/themes/default.blade.php but not finding it. But it silently ignores the exception thrown.

This is the same exception that's killing it in a testing environ, except, as I say, with HTML rather than the default filename.

Please or to participate in this conversation.