# ActionMailer

**URL:** <https://www.ruby-forum.com/t/actionmailer/161792>\
**Category:** Rails\
**Created:** [March 2, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/actionmailer/161792 "2009-03-02T14:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f17d59/32.png) [@tanker](https://www.ruby-forum.com/u/tanker)\
**Post date:** [March 2, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/actionmailer/161792/1 "2009-03-02T14:33:14Z")

</div>

i have this in my mdel infomailer.rb

class Infomailer \< ActionMailer::Base  
helper :application  
end

but i can’t understand why i can’t use method defined i  
application\_helper.rb

in template app/views/infomailer/send\_order.html.erb

please help

---

<div class="post-metadata">

**Author:** ![tanker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f17d59/32.png) [@tanker](https://www.ruby-forum.com/u/tanker)\
**Post date:** [March 3, 2009, 6:41am UTC](https://www.ruby-forum.com/t/actionmailer/161792/2 "2009-03-03T06:41:30Z")

</div>

Ralph H. wrote:

> i have this in my mdel infomailer.rb
> 
> class Infomailer \< ActionMailer::Base  
> helper :application  
> end
> 
> but i can’t understand why i can’t use method defined i  
> application\_helper.rb
> 
> in template app/views/infomailer/send\_order.html.erb
> 
> please help

You can write the methods whichever you want to send mail in model  
itself. Why you are going for helper…  
You can call this method whereever you want.
