NameError: uninitialized constant Mail :: Parsers :: ContentTransferEncodingParser

Sometimes, when I send mass email on a hero, some of them fail with the following error: NameError: uninitialized constant Mail::Parsers::ContentTransferEncodingParser

I don’t know why this is so, but I think that maybe it could be caused by use attachments.inline in mailer. Any ideas what might cause this problem?

+4
source share
1 answer

I create an initializer with the following line:

Mail.eager_autoload! if Rails.env.production? && defined?(Mail)

and this fixes the problem.

+5
source

Source: https://habr.com/ru/post/1615101/


All Articles