OpenBuildings / postmark

Postmark transport for Swift Mailer
https://github.com/OpenBuildings/postmark
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

Missing ContentID header in Attachments array. #24

Closed igorlamos closed 9 years ago

igorlamos commented 9 years ago

There is a missing ContentID key when constructing Attachments array and therefore it's not possible to use inline embedded images in email messages sent using Postmark API. Corresponding documentation can be found here: http://developer.postmarkapp.com/developer-send-api.html#inline-images

hkdobrev commented 9 years ago

Thanks for this!

Could you update the test here as well? https://github.com/OpenBuildings/postmark/blob/master/tests/src/Swift_Transport_PostmarkTransportTest.php#L219

As you can see the build is failing because of this. https://travis-ci.org/OpenBuildings/postmark/jobs/54629787

You can run the tests locally by running composer install and phpunit.

igorlamos commented 9 years ago

Sorry for that ... Test updated.

hkdobrev commented 9 years ago

Squashed and merged in https://github.com/OpenBuildings/postmark/commit/ef63402a3c7476a79bf454e7682640abbb758c63. Cheers!

hkdobrev commented 9 years ago

Released as 0.3.2 it will also be present in the next 0.4.0 release. Didn't bother to cherry-pick and fix the conflicts in 0.2.x. If anyone is interested, they could submit a PR towards 0.2.x with resolved conflicts.

hkdobrev commented 7 years ago

@igorlamos We've found a problem with the way this sets the Content-ID and fixed it in 0.3.5. The Content-ID does not makes sense for the attachments with Content-Disposition: attachment. And since Postmark doesn't allow access to set the Content-Disposition header, it automatically converts attachments to inline when they have a Content-ID. This prevents some clients from seeing attachments such as Mac OS Mail.app which would not always present correctly inline attachments when they are not images such as PDFs.

Could you please verify our logic and test it out with your use case? Thanks!