Sometimes when I send mass email on heroku some of them fail with the following error:
NameError: uninitialized constant Mail::Parsers::ContentTransferEncodingParser
I have no idea why is that but I think that maybe this maybe caused by using attachments.inline in mailer
. Any ideas what may cause this problem?
I create initializer with following line:
Mail.eager_autoload! if Rails.env.production? && defined?(Mail)
and that fixes the problem.
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