ActionMailer Problem

Hello,

I am trying to send automated e-mails using ActionMailer in a Rails
project. The configuration I am using is a working configuration on
another server. But even when I try sending within irb, I get the same
problem. Any ideas? Here is the error I get when I try and send the
message:

Errno::ECONNREFUSED: Connection refused - connect(2)
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in
`initialize'
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `new'
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'
        from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:393:in `do_start'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
        from /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start'
        from /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/
action_mailer/base.rb:511:in `perform_delivery_smtp'
        from /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/
action_mailer/base.rb:397:in `send'
        from /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/
action_mailer/base.rb:397:in `deliver!'
        from /usr/local/lib/ruby/gems/1.8/gems/actionmailer-1.2.5/lib/
action_mailer/base.rb:291:in `method_missing'
        from (irb):47

In environment.rb
ActionMailer::Base.smtp_settings = {
  :address => mail_server,
  :port => 25,
  :domain => domain,
  :authentication => :login,
  :user_name => user,
  :password => pass
}

Figured it out. For those experiencing this problem, try (in
environment.rb):

ActionMailer::Base.delivery_method = :smtp