uninitialized constant ActionMailer::Quoting::Encoding

Published on Author Akhil Bansal1 Comment

Just a quick note, If you are getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer, then make sure that your mailer look like:

 class Notifier < ActionMailer::Base
   def signup_notification(recipient)
     recipients recipient.email_address_with_name
     bcc        ["[email protected]"]
     from       "[email protected]"
     subject    "New account information"
     body       :account => recipient
   end
 end

Actually, yesterday we were getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer in production but it was working fine in all modes(development/production) on localhost. Our mailer was like:

 class Notifier < ActionMailer::Base
   def signup_notification(recipient)
     @recipients   = recipient.email_address_with_name
     @bcc            = ["[email protected]"]
     @from          = "[email protected]"
     @subject       = "New account information"
     @body          = :account => recipient
   end
 end

We could not find the actual issue with this mailer. But the above said error was disappeared when we changed the same mailer as following:

 class Notifier < ActionMailer::Base
   def signup_notification(recipient)
     recipients recipient.email_address_with_name
     bcc        ["[email protected]"]
     from       "[email protected]"
     subject    "New account information"
     body       :account => recipient
   end
 end

Do you guys have any idea? I would love to listen from you.

Update: No its not solved yet. Still same issue. May be some issue with character encoding with the TMail object. 🙁

Update 2: This was the issue http://github.com/hmcgowan/roo/issues#issue/4/comment/106328

One Response to uninitialized constant ActionMailer::Quoting::Encoding

Leave a Reply

Your email address will not be published. Required fields are marked *