Creating tmail object with ActionMailer


I am newbie to rails, I am wanting to send a mass email to an email list
on my database, so I am creating a tmail object using ActionMailer then
sending the email using Net::SMTP.

I could send email fine using the same set up through ActionMailer (But
when I get to between 500-700 emails I get timed out and it is SSSSlow)

But when I try to create a Tmail object it is giving me argument errors,

ArgumentError (wrong number of arguments (0 for 1)):

I am calling a class below with

Notifier.create_mail(dealer, params)

class Notifier < ActionMailer::Base
def mail(dealer, params)
@from = “[email protected]
@recipients =
@subject = params[:subject]
@body[:recipient] =
@body[:message] = params[:message]

There is no problem sending this as Notifier.deliver_mail(dealer,

Does no one know why this may be?

Many thanks in advance


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