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.
Hi there,
I am making 2 small changes in order to fix some problems I had with the library.
MultiMail::Message::Base
class to inherit fromSimpleDelegator
instead of inherit fromMail::Message
. The reason behind this is that when an instance ofMultiMail::Message::Base
is created, the originalMail::Message
is serialized into a string and then parsed back into anotherMail::Message
object. Apart of being more performant, this fixes a problem I was having with the encodings.If you have some
UTF-8
characters into the html part, when serialized is then converted into anUS-ASCII
string, and when parsed again and converted into aMail::Message
object, the html body is converted into a7bit
string.If you then call
JSON.dump
and you pass that string, it fails saying it can't convert that unknown7bit
character into aUTF-8
one. Conserving the originalMail::Message
solves thisMultiMail::Sender::Base
I am changing theattr_reader
for@settings
into anattr_accessor
, to maintain compatibility with the originaldelivery_methods
of theMail
gem.Thanks