# Creating tmail object with ActionMailer

**URL:** <https://www.ruby-forum.com/t/creating-tmail-object-with-actionmailer/92974>\
**Category:** Rails\
**Created:** [April 26, 2007, 7:10am UTC](https://www.ruby-forum.com/t/creating-tmail-object-with-actionmailer/92974 "2007-04-26T07:10:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f0a364/32.png) [@richard](https://www.ruby-forum.com/u/richard)\
**Post date:** [April 26, 2007, 7:10am UTC](https://www.ruby-forum.com/t/creating-tmail-object-with-actionmailer/92974/1 "2007-04-26T07:10:42Z")

</div>

Hello,

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,  
saying

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 = “removed\_email\_address@domain.invalid”  
@recipients = dealer.email  
@subject = params[:subject]  
@body[:recipient] = dealer.name  
@body[:message] = params[:message]  
end  
end

There is no problem sending this as Notifier.deliver\_mail(dealer,  
params)

Does no one know why this may be?

Many thanks in advance

Richard
