Re: ActionMailer 2.0.2 NameError

Jonathon Davis-2 wrote:

:address => "my.server.address.com",

C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
from C:/InstantRails/rails_apps/rails_space/config/
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:inrequire’
from script/server:3
Any assistance would be greatly appreciated.

Hey guys, I had this problem as well, I searched around a bit in the
base.rb(X:\ruby\libs\ruby\gems\1.8\gems\actionmailer-2.0.2\lib\action_mailer\base.rb)
and found the problem(for me anyhow). Instead of
“ActionMailer::Base.server_settings = { … ect …” they have it defined
as
“ActionMailer::Base.smtp_settings = { … ect …” to define our smtp
servers
parameters.

Taken directly from base.rb:

* smtp_settings - Allows detailed configuration for :smtp

delivery method:

* :address Allows you to use a remote mail server. Just

change it from its default “localhost” setting.

* :port On the off chance that your mail server doesn’t

run
on port 25, you can change it.

* :domain If you need to specify a HELO domain, you can

do it
here.

* :user_name If your mail server requires authentication,

set
the username in this setting.

* :password If your mail server requires authentication,

set
the password in this setting.

* :authentication If your mail server requires

authentication, you need to specify the authentication type here.

As for where to place it definitely create it it’s own file in the
initializers directory with your connection info, and not at the end of
the
environment.rb (\yourapp\config\initializers\action_mailer.rb)

Here is what the file(action_mailer.rb) should look like:

ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => “localhost”, # or an external ip if your using a remote
smtp
:port => 25,
:domain => “domainnamehere”,
:authentication => :login,
:user_name => “username here”,
:password => “passwordhere”
}

Cheers, Ziggah


View this message in context:
http://www.nabble.com/ActionMailer-2.0.2-NameError-tp15763436p16145138.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs