Jason Lenhart on 5 Feb 2006 16:04:39 -0000 |
Okay ... got it working. You can tell I am a total newbie - isn't it a duty for all newbies to not read docs :-D I do have a question at the end of this email :) So I generated the action mailer with my settings changed to the following -- just to get it working on my local machine: ActionMailer::Base.server_settings = { :address => "smtp.comcast.net", :port => 25, :domain => "www.designedfinishesinc.com", :user_name => "jplenhart", :password => "XXXX", :authentication => :login } It works in a test controller i set up by calling ContactUsMailer.create_contact() Where contact is obviously the template to use for emails. Cool stuff - that was pretty easy. My question is that I am putting this up on a RoR hosting site - it seems that I just put my files in a Rails directory. To get the configuration to point to production .. they should be setting this up on there end right ... I believe it is an Apache env variable that will do it. If I run into problems, I suppose the easiest thing to do is to place production settings into all the config environments. Thanks, Jason --- Jason Lenhart <jplenhart@yahoo.com> wrote: > Hi, > > I am new to RoR - and trying to setup up the > ActionMailer. Wondering if anyone might be able to > help out a newbie. > > So I have gone into my /config/ development,test, > and > production files and placed the following entries: > > > config.action_mailer.delivery_method = :smtp > config.action_mailer.address = > smtp.designedfinishesinc.comment > config.action_mailer.authentication = login > config.action_mailer.user_name = user > config.action_mailer.user_name = pass > > I have a feeling the above is my problem - but then > I > go to create my mailer: > > ruby script/generate mailer ContactMailer confirm > sent > > and I get the following: > > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:171:in > `load_environment': undefined method > `designedfinishesinc' for :smtp:Symbol > (NoMethodError) > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:150:in > `load_environment' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:147:in > `silence_warnings' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:147:in > `load_environment' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:73:in > `process' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:36:in > `send' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb:36:in > `run' > from > ./script/../config/../config/environment.rb:10 > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__' > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.2/lib/active_support/dependencies.rb:213:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/commands/generate.rb:1 > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__' > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.2/lib/active_support/dependencies.rb:213:in > `require' > from script/generate:3 > > Thank you, > > Jason > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > talk mailing list > talk@phillyonrails.org > http://lists.phillyonrails.org/mailman/listinfo/talk > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ talk mailing list talk@phillyonrails.org http://lists.phillyonrails.org/mailman/listinfo/talk
|
|