# Actionmailer

**URL:** <https://www.ruby-forum.com/t/actionmailer/95390>\
**Category:** Rails\
**Created:** [January 17, 2006, 5:36am UTC](https://www.ruby-forum.com/t/actionmailer/95390 "2006-01-17T05:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ray](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@ray](https://www.ruby-forum.com/u/ray)\
**Post date:** [January 17, 2006, 5:36am UTC](https://www.ruby-forum.com/t/actionmailer/95390/1 "2006-01-17T05:36:29Z")

</div>

I’m getting an error when I’m tyring to use the actionmailer.  
undefined method `deliver\_signup\_thanks’ for Notifier:Class

This is what I have in the controller.  
def emailTest  
Notifier::deliver\_signup\_thanks()  
render\_text “email test”  
end

This is what I have in notifier model (notifier.rb)  
class Notifier \< ActiveRecord::Base  
def signup\_thanks()  
# Email header info MUST be added here  
@recipients = “removed\_email\_address@domain.invalid”  
@from = “removed\_email\_address@domain.invalid”  
@subject = “Thank you”

```
# Email body substitutions go here
# @body[â??first_nameâ?] = user.first_name
# @body[â??last_nameâ?] = user.last_name

```

end  
end

This is what I have in environment.rb  
ActionMailer::Base.server\_settings = {  
:address =\> “[smtp.postoffice.net](http://smtp.postoffice.net)”,  
:port =\> 25,  
:domain =\> “[www.test.us](http://www.test.us)”,  
:user\_name =\> ‘test’,  
:password =\> ‘test’,  
:authentication =\> :login  
}

Can anyone see anything wrong here? Appreiciate the help. Thanks

---

<div class="post-metadata">

**Author:** ![ray](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@ray](https://www.ruby-forum.com/u/ray)\
**Post date:** [January 17, 2006, 6:35am UTC](https://www.ruby-forum.com/t/actionmailer/95390/2 "2006-01-17T06:35:19Z")

</div>

On 16 Jan '06, at 8:36 PM, ray wrote:

> ```
> # @body[â??last_nameâ?] = user.last_name
> 
> ```
> 
> end  
> end

That should be a subclass of ActionMailer::Base if you want to use it  
to send mail…

–Jens

---

<div class="post-metadata">

**Author:** ![ray](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@ray](https://www.ruby-forum.com/u/ray)\
**Post date:** [January 17, 2006, 9:11am UTC](https://www.ruby-forum.com/t/actionmailer/95390/3 "2006-01-17T09:11:47Z")

</div>

On Tue, 2006-01-17 at 05:36 +0100, ray wrote:

> This is what I have in notifier model (notifier.rb)  
> end  
> }
> 
> Can anyone see anything wrong here? Appreiciate the help. Thanks

You might try to do the following:

./script/generate mailer Notifier signup\_thanks

Then look at the files it generated and compare to yours. 🙂

-Robby

–  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

- Robby R., Founder & Executive Director \*
- PLANET ARGON, LLC | [www.planetargon.com](http://www.planetargon.com) \*
- Ruby on Rails Development, Consulting, and Hosting \*
- Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 \*
- blog: [www.robbyonrails.com](http://www.robbyonrails.com) | book: [www.programmingrails.com](http://www.programmingrails.com) \*  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/
