问题
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?
回答1:
I create initializer with following line:
Mail.eager_autoload! if Rails.env.production? && defined?(Mail)
and that fixes the problem.
来源:https://stackoverflow.com/questions/33615873/nameerror-uninitialized-constant-mailparserscontenttransferencodingparser