# Configuring an object inheriting from actionmailer

**URL:** <https://www.ruby-forum.com/t/configuring-an-object-inheriting-from-actionmailer/148067>\
**Category:** Rails\
**Created:** [September 8, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/configuring-an-object-inheriting-from-actionmailer/148067 "2008-09-08T22:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [September 8, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/configuring-an-object-inheriting-from-actionmailer/148067/1 "2008-09-08T22:25:17Z")

</div>

I’ve been attempting to create a simple postback script using ruby, one  
that takes what is sent to it (cgi) and emails it out (action mailer). I  
ran into some problems (cgi values weren’t coming through whenever I  
required action mailer) early on using the two of these as follows:

require “cgi”  
require “rubygems”  
require “action\_mailer”

Rolling back to actionmailer 1.3.6 fixed those problems. I’ve since  
found that using the two as follows also allows the cgi values to come  
through using the latest action mailer:

require “cgi”  
require “rubygems”  
gem “actionmailer”

However, I can’t figure out how to configure the object inheriting from  
action mailer when I use gem “actionmailer”.

I used to do this:

ActionMailer::Base.delivery\_method = :smtp

But that give me an uninitialized constant error on ActionMailer. How  
can I configure these options now?

Thanks,  
Dave
