0

Yesterday I did a composer-update to make Laravel Debugbar work, but today I found a big problem.

Every single email that I send out with Laravel and has an attachment get's buggered up. With buggered up I mean that the email doesn't show as HTML anymore, and the entire email content shows as plain text. Before the update it all worked perfectly fine.

I tried several internal functions to attach the file like file_get_contents and then attach with attachData but nothing helps.

The dividers show up as well, as well as part headers like encoding and content type:

--=_swift_v4_1416930602_4b48853874e4571583469e0f8bf178d7e6cb24dd=_

How I send the email:

Mail::send('emails.master', $data, function($email) {
    // Set from, to...
    $email->attach(Request::root() . '/quotepdf/' . Input::get('quoteId') . '/download', array('as' => 'Quote #' . Input::get('quoteId') . '.pdf', 'mime' => 'application/pdf'));
});

My attachment shows as a base-64 encoded string, which seems to be correct. Any ideas?

If I just take a file on the fs, and attach that as an attachment, I have the exact same problem. Only without attachment the email shows as normal HTML.

Pastebin of the email I received: http://pastebin.com/NFYUVqGP

Basaa
  • 1,615
  • 4
  • 20
  • 41
  • Don't have a definitive answer for you, but I know that playing with the mail settings helps sometimes. – the Saint Genius Dec 01 '14 at 16:21
  • Thanks for the comment. I ended up doing a clean Laravel installation and moving over all controllers, views, models etc etc. Nothing helped till the point that I was wasting my time. – Basaa Dec 01 '14 at 21:14

0 Answers0