devmonster
devmonster

Reputation: 323

set up action mailer to work with rabbitmq in rails 3

i'm trying to set up actionmailer to work with rabbitmq.

in development.rb:

config.action_mailer.queue = Messaging::AmqpClient.instance

and in the the mailer:

class OrdersNotifier < ActionMailer::Base
  default from: "me <[email protected]>"
  def queue
    Messaging::AmqpClient.instance.publish('ddd', 'test_msg')
  end

to send a mail I am using:

 OrdersNotifier.new_order_email_to_seller(self).deliver

bu I get :

undefined method `queue=' for ActionMailer::Base:Class

when trying to deliver the mail.

Upvotes: 0

Views: 273

Answers (1)

JAR.JAR.beans
JAR.JAR.beans

Reputation: 10014

I might be wrong but "queue" is a rails 4 only feature that is by now removed from master branch.

See here:

http://blog.remarkablelabs.com/2012/12/asynchronous-action-mailer-rails-4-countdown-to-2013

The queue feature has been removed from the master branch, which means it will not be making the initial Rails 4.0 release.

Upvotes: 1

Related Questions