jdavidbakr / mail-tracker

Package for Laravel to inject tracking code into outgoing emails.
MIT License
567 stars 129 forks source link

Fixed mutating content type from RelatedPart to MultiPart #195

Closed Jason-Morcos closed 1 year ago

Jason-Morcos commented 2 years ago

Fixes: #194

I tried to write a test, but I can't find a way to check the Content-Type header content of the outgoing email. It appears to not be included in the headers on sent_emails.

Basically, mail-tracker was changing the Content-Type header from Content-Type: multipart/related;... to Content-Type: multipart/alternative;... for ALL RelatedPart messages. This likely impacts MixedPart too.

I also fixed the previously-broken test for RelatedPart messages that was blocking PR #190

This was caused by https://github.com/jdavidbakr/mail-tracker/commit/c9a33799d46379c9ab65db1bb3f719544d32e955 only half-fixing the issue mentioned in #172. That commit added support for those two types of message contents as inputs, but isn't properly handling them as outputs.

jdavidbakr commented 1 year ago

Thanks!