You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using sparkpost_rails with DelayedJob. DelayedJob serializes the mail object to a database table using YAML, for later execution. When the job is deserialized from YAML, its enclosed Mail::Message instance is also deserialized, however the sparkpost_data method is undefined. Since this method is defined inside of the mail method in DataOptions::InstanceMethods, any Mail::Message instance created outside of this method (e.g. through deserialization) will not have the method present. This means all of our emails fail to send, with (e.g.) #<NoMethodError: undefined method sparkpost_data' for #Mail::Message:0x00007f90cdcc22d8>`.
I'll fork the code and experiment with some possible fixes, but if there's an obvious/ preferred approach, please do let me know and I'll pursue it.
The text was updated successfully, but these errors were encountered:
We are using sparkpost_rails with DelayedJob. DelayedJob serializes the mail object to a database table using YAML, for later execution. When the job is deserialized from YAML, its enclosed
Mail::Message
instance is also deserialized, however thesparkpost_data
method is undefined. Since this method is defined inside of themail
method inDataOptions::InstanceMethods
, anyMail::Message
instance created outside of this method (e.g. through deserialization) will not have the method present. This means all of our emails fail to send, with (e.g.)#<NoMethodError: undefined method
sparkpost_data' for #Mail::Message:0x00007f90cdcc22d8>`.I'll fork the code and experiment with some possible fixes, but if there's an obvious/ preferred approach, please do let me know and I'll pursue it.
The text was updated successfully, but these errors were encountered: