ActionMailer(1.3.5) model problem in my Rails1.2.5

Hi all:
I user the command : ruby script/generate mailer FinanceMailer
alert_customer_balance, then ,i have this files:

class FinanceMailer < ActionMailer::Base

def alert_customer_balance(sent_at = Time.now)
@subject = ‘FinanceMailer#alert_customer_balance’
@body = {}
@recipients = ‘[email protected]
@from = ‘[email protected]
@sent_on = sent_at
@headers = {}
end
end

After this ,i start ruby with: ruby script/consolee$B!#e(B at this
consoel
enviroment, i put “FinanceMailer.alert_customer_balance”, But system
return :
NoMethodError: undefined method `alert_customer_balance’ for
FinanceMailer:Class

    from c:/ruby/lib/ruby/gems/1.8/gems/actionmailer-1.3.5/lib/

action_mailer
/base.rb:335:in `method_missing’
from (irb):13

I think maybe some inint method error?

I think my problem is :

FinanceMailer.new
=> nil

On Jun 15, 3:42 am, geniusfox [email protected] wrote:

@from       = '[email protected]'
@sent_on    = sent_at
@headers    = {}

end
end

After this ,i start ruby with: ruby script/consolee$B!#e(B at this consoel
enviroment, i put “FinanceMailer.alert_customer_balance”, But system

That’s not how Action Mailer works. If you define the instance method
foo, then it creates for you two class methods:

FinanceMailer.create_foo (creates a TMail object representing an email
from your foo method)
FinanceMailer.deliver_foo (creates and sends an email)

Fred