Hello all,
I''m having trouble with this simple email class I made for postbacks.
When I run this from the command line an email is sent, however when I
access this .rb file through a browser nothing happens.
-------------------------
#!/usr/bin/ruby
require "rubygems"
require "action_mailer"
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.domain.com",
:port => "25",
:domain => "domain.com"
}
class Emailer < ActionMailer::Base
def test()
recipients "me-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org"
from "you-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org"
subject "subject"
body "body"
end
end
Emailer.deliver_test()
-------------------------
I''m running Apache 2.2, and this is what my ruby.conf file for it looks
like:
-------------------------
LoadModule ruby_module modules/mod_ruby.so
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
RubyRequire apache/eruby-run
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.erb>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>
-------------------------
ExecCGI in enabled as well.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
David Susco
2008-Sep-05 14:02 UTC
Re: actionmailer sends from commandline but not from web
Fixed. It was an SELinux issue. I googled around after looking in Apache''s error log, I had to allow HTTP scripts to contact the network. Dave -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---