# Setting up Action Mailer

**URL:** <https://www.ruby-forum.com/t/setting-up-action-mailer/90224>\
**Category:** Rails\
**Created:** [March 26, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/setting-up-action-mailer/90224 "2007-03-26T21:55:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [March 26, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/setting-up-action-mailer/90224/1 "2007-03-26T21:55:31Z")

</div>

I’m trying out Action Mailer for the first time. I’m not getting to  
first base. I thought that the instructions were pretty clear in that  
the first thing that I needed to do is to add:

config.action\_mailer.delivery\_method = :smtp | :sendmail | :test

to config/environment.rb (assuming that I want to use the same  
configuration for development, testing, and production).

So, I added:

config.action\_mailer.delivery\_method = :sendmail

to the end of config/environment.rb right below where it says:

# Include your application configuration below

Now when I try to start the web server I get:

/home/doug/test1/config/environment.rb:62: undefined local variable or  
method `config’ for main:Object (NameError)

Any suggestions on what I might be doing wrong? Thanks for any input.

```
  ... doug
```
