How can I serialise the mailer so that it can be stored for further use?
The serialised data should be disconnected and self sufficient to be delivered on separate machine that should deliver that message (not knowing about database or anything else).
Suppose you usually send emails with this:
MyMailer.some_email(...).deliver
Instead delivering it, you can convert it to a string and transfer the string to another server:
raw_mail = MyMailer.some_email(...).to_s
On another server, send the email:
Mail.new(raw_mail).deliver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With