ArgumentError when setting ActionMailer

Hi all,

I don’ know what’s wrong in my setting. I put as it said in books,
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
for 0) (ArgumentError)

Did i miss something?



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.


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 for details and updates!