sparkpost_data is addded to the message object through metaprogramming
in the mail method. Instances of Mail::Message created outside of
this method (e.g. deserializing from a data store) will therefore not have
this attribute defined. This change separates the attribute definition
to ensure it exists on the object's class and not just the instance's
singleton class.
sparkpost_data
is addded to the message object through metaprogramming in themail
method. Instances of Mail::Message created outside of this method (e.g. deserializing from a data store) will therefore not have this attribute defined. This change separates the attribute definition to ensure it exists on the object's class and not just the instance's singleton class.Closes #59