jdavidbakr / mail-tracker

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

Filestystem Strategy & Mailable models #153

Closed lucianholt97 closed 2 years ago

lucianholt97 commented 2 years ago
  1. Content storage strategy: The new config log-content-strategy allows to switch between database and filesystem as storage strategy for your email content. The problem with database is that the table can get too big and performance decreases.

  2. Mailable models: This allows to attach a model to a sent email by setting a X-Mailable-Id and X-Mailable-Type customer header. You can then add the HasSentEmails trait to selected models to query the related emails easily.

  3. Customizable SentEmail model: You can now pass your own (extended) SentEmail Model by setting it in the config.

Let me know what you think and if you are interested to include these changes.

jdavidbakr commented 2 years ago

I like it. Can you see why the tests are failing and try to fix that?

lucianholt97 commented 2 years ago

Thanks for the feedback. I needed to update testbench and phpunit to use the new artisan test command with a better feedback compared to plain phpunit. Can you update the dev deps for the automated tests? Locally, all tests pass.

jdavidbakr commented 2 years ago

You can change the travis.yml in your pull request to modify the script that's called.

jdavidbakr commented 2 years ago

@lucianholt97 can you fix the merge conflicts and get this pull request to pass automated tests please? The updates look good.

bretto36 commented 2 years ago

This is great. I particularly like the storage option. We created a job that moved some of the columns out to S3 Storage to reduce the size of the database table.... still at 1.7GB without any subject/content/headers in the DB table

lucianholt97 commented 2 years ago

@jdavidbakr can you help me with the automated tests and merge conflicts? I am not too familiar with Github CI/CD.