title: How to use and customize an HTML email (not markdown) in Laravel 5.6?
body: <p>So I'm trying to send an html email in Laravel 5.6 and am running into some fun issues.</p>
  
  <p>For one, the documentation is pretty terrible when it comes to customizing the HTML content, or even using the default HTML layout.</p>
  
  <p><a href="https://laravel.com/docs/5.6/mail#writing-mailables" rel="nofollow noreferrer">https://laravel.com/docs/5.6/mail#writing-mailables</a></p>
  
  <p>There is a section for "Configuring the View" where it tells you to just do something like the following.</p>
  
  <pre><code>return $this-&gt;view('emails.orders.shipped');
  </code></pre>
  
  <p>Cool, I'm doing that. In my blade file I have just</p>
  
  <pre><code>Here is a test message.
  </code></pre>
  
  <p>And it sends just fine. But what doesn't make any sense is that the page also says you can run the following artisan command to generate the default email template.</p>
  
  <pre><code>php artisan vendor:publish --tag=laravel-mail
  </code></pre>
  
  <p>It says "The mail directory will contain a html and a  markdown directory, each containing their respective representations of every available component. The components in the html directory are used to generate the HTML version of your email."</p>
  
  <p>The documentation also goes into depth about how to customize and use these markdown templates. You just call <code>@component('mail::message')</code> at the top of the markdown blade file... but <strong>I do not want markdown</strong>. I just want the regular HTML email.</p>
  
  <p><code>@component('mail::message')</code> doesn't work when using <code>-&gt;view()</code> only when using <code>-&gt;markdown()</code>. I also can't just do the following.</p>
  
  <pre><code>@extends('vendor.mail.html.layout')
  Test message
  </code></pre>
  
  <p>As it tells me slot is an undefined variable in the error log.</p>
  
  <p>Not sure why, the layout.blade.php file in the /vendor/mail/html/ directory contains the following...</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;style&gt;
          @media only screen and (max-width: 600px) {
              .inner-body {
                  width: 100% !important;
              }
  
              .footer {
                  width: 100% !important;
              }
          }
  
          @media only screen and (max-width: 500px) {
              .button {
                  width: 100% !important;
              }
          }
      &lt;/style&gt;
  
      &lt;table class="wrapper" width="100%" cellpadding="0" cellspacing="0"&gt;
          &lt;tr&gt;
              &lt;td align="center"&gt;
                  &lt;table class="content" width="100%" cellpadding="0" cellspacing="0"&gt;
                      {{ $header ?? '' }}
  
                      &lt;!-- Email Body --&gt;
                      &lt;tr&gt;
                          &lt;td class="body" width="100%" cellpadding="0" cellspacing="0"&gt;
                              &lt;table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0"&gt;
                                  &lt;!-- Body content --&gt;
                                  &lt;tr&gt;
                                      &lt;td class="content-cell"&gt;
                                          {{ Illuminate\Mail\Markdown::parse($slot) }}
  
                                          {{ $subcopy ?? '' }}
                                      &lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;/table&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
  
                      {{ $footer ?? '' }}
                  &lt;/table&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Not sure why it's calling <code>Markdown::parse($slot)</code> in the html version of the email.</p>
  
  <p>How do I go about extending this view in an html email? Was hoping to at least get the default html template without having to build my own...</p>