Store Content of outgoing mail messages in the database #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Twitter the question came up, why the package doesn't store the content/body of outgoging mails.
I honestly didn't think about that at all, as my primary usecase for the packge is to keep track of meta data.
Implementing this feature is trivial, as the
Swif_Message
instance exposes agetBody()
method.The feature is hidden behind a new configuration flag (
sends.store_content
) and has to be enabled by the consumer of the package. I will keep it that way in future releases, as I would like to prevent users from shooting themself in the foot. Storing the body of outgoing mails can blow up the size of a database pretty quickly.Questions to clarify
content
-column? Or should this be the concern of the consumer? (Like done in the UPGRADE guide for v0 to v1) → Will make this a new major version. The package is too young to already add multiple migrations to it. Will provide instructions in the upgrade guide