title: Laravel 4 attach PDF to email
body: <p>I have a problem.  I created a PDF which I attached to an email, but the email is empty. It does not have any attached files.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>$pdf = PDF::load($html, 'Letter', 'portrait')-&gt;output();
  $ruta_pdf = public_path().'/tmp/'.$factura-&gt;folio_fiscal.".pdf";
  File::put($ruta_pdf, $pdf);
  
  Mail::send('emails.factura', $data, function($message) use ($emisor, $receptor, $factura, $ruta_xml, $ruta_pdf){
  
  $message-&gt;attach($ruta_pdf);
  $message-&gt;from('mail@apscreativas.com', $emisor-&gt;nombre);
  $message-&gt;to('mail2@apscreativas.com', $receptor-&gt;nombre);
  $message-&gt;subject('SUbject');
  
  });
  </code></pre>
  
  <p>I found the solution, the email template can't be empty, must be have a minimal template.</p>