Laravel email with PDF attachment not working - results in strange email character content

141 Views Asked by At

I am sending an email with Laravel with a PDF file attachment.

The result is strange, its just characters, it begins with: --_=_swift_1671699716_49f2ebd5a59f7b3e03005ac7ddc21c5a_=_ Content-Type: application/pdf; name=

enter image description here

Any idea how I can fix this?

1

There are 1 best solutions below

0
Paul Vincent Beigang On

The laravel email view is empty, because I only use the subject and the attached PDF as content.

But adding email content to the view is fixing it, I can even leave it empty and just add

<!-- empty email body -->