Problem with ar_mailer

Posted by Roberto on Stack Overflow See other posts from Stack Overflow or by Roberto
Published on 2008-09-25T10:10:05Z Indexed on 2010/04/04 17:03 UTC
Read the original article Hit count: 551

Filed under:
|
|

Hi guys, I'm running a strange problem sending emails. Basicly I'm getting this exception:

ArgumentError (wrong number of arguments (1 for 0)):
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `new'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `create'
/usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:92:in `perform_delivery_activerecord'
/usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `each'
/usr/lib/ruby/gems/1.8/gems/ar_mailer-1.3.1/lib/action_mailer/ar_mailer.rb:91:in `perform_delivery_activerecord'
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `__send__'
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:508:in `deliver!'
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.1.1/lib/action_mailer/base.rb:383:in `method_missing'
/app/controllers/web_reservations_controller.rb:29:in `test_email'

In my web_reservations_controller I have a simply method calling

TestMailer.deliver_send_email

And my TesMailer is something like:

class TestMailer < ActionMailer::ARMailer
  def send_email
    @recipients = "[email protected]"
    @from = "[email protected]"
    @subject = "TEST MAIL SUBJECT"
    @body = "<br>TEST MAIL MESSAGE"
    @content_type = "text/html"
  end
end

Do you have any idea?

Thanks! Roberto

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails