Error using the Fetcher plugin to handle incoming mail using Rails?

I am trying to run a basic example of an email processing application. Nothing unusual, just the most functional at the moment. I installed Fetcher, configured YAML, updated the receiver, and created the IncomingMailHandler class.

When I go to start FetcherDaemon, I get the following error.

/Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:105: in `const_missing ': uninitialized constant MailerDaemonFetcherDaemon :: IncomingMailHandler (NameError)

I am using Rails 2.3.2 with the latest Fetcher plugin. The IncomingMailHandler class in my dir directory is as follows:

class IncomingMailHandler < ActionMailer::Base def receive(email) logger.info("Got a mail about: #{mail.subject}") end end 

Help!

+4
source share
2 answers

Okay, so basically, I'm dumb. I followed the instructions throughout the damned web, with the exception of most of the cut and dry explanations on github. A few days later, I just went through the movements and the boom; it worked flawlessly.

So, to anyone who finds this with the same problem (whether you tried to follow the outdated WAY instructions in the PeepCode tutorial or found some tips on the blog), don't be dumb like me. The latest information is on github.

Thanks to everyone who looked at this!

+2
source

I assume you did not install MailFetcher

 MailFetcher.mailer_class = :incoming_mail_handler 

put this in environment.rb after the RailsInitializer block. If you want to use POP3 instead of IMAP, you should also specify this there

0
source

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


All Articles