craigpaul / laravel-postmark

A Postmark adapter for Laravel
MIT License
204 stars 23 forks source link

Inline attachments not working #126

Closed djurovicigoor closed 3 years ago

djurovicigoor commented 3 years ago

I am trying to add an inline attachment inside my blade email file.

$message->embed(public_path('img/mail/logo.png')) or $message->embed(asset('img/mail/logo.png')) but only what I got in final email is data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7

I also tried the official wildbit library recommended by Laravel doc (https://github.com/wildbit/swiftmailer-postmark) and that works fine. I need to continue using this package because I can get MessageID.

craigpaul commented 3 years ago

Hey @djurovicigoor, that's strange, unless there's some weird conflict with this package, I'm not exactly sure how it could affect the rendering of a blade view. I'll take a look and see what I can figure out.

craigpaul commented 3 years ago

@djurovicigoor I found the issue. I wasn't handling the attachments fully inside of the getAttachments function. Will have a fix released pretty quick here. Thanks for finding that! 👍