ArgumentError when setting ActionMailer

Hi all,

I don’ know what’s wrong in my setting. I put as it said in books,
tutorials
and recheck it in the api ref.

ActionMailer::Base.delivery_method :sendmail

When i start the server (Mongrel), i got this error:

config/environment.rb:62:in `delivery_method’: wrong number of arguments
(1
for 0) (ArgumentError)

Did i miss something?

Thanks,

Dida

Hi –

On Sat, 12 Jul 2008, Adinda P. wrote:

for 0) (ArgumentError)

Did i miss something?

Yes: an equal sign :slight_smile:

ActionMailer::Base.delivery_method = :sendmail

In the API docs you’ll see this, above the section that lists
deliver_method as one of the things you can tweak:

These options are specified on the class level, like
ActionMailer::Base.template_root = “/my/templates”

That means that for everything that follows, you should use that style
of assignment.

David


Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails July 21-24 Edison, NJ
Advancing With Rails August 18-21 Edison, NJ
See http://www.rubypal.com for details and updates!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs