[PLUG-Devel] rails and sending email

Josh Coffman joshcoffman at gmail.com
Tue Sep 18 22:37:21 MST 2007


Thanks for the sendmail tip... i was googling that so it was perfect timing.
Yeah, I tried setting delivery both to sendmail and smtp, with the
smtpsettings section at the bottom of the environment.rb

ok.. a little progress....

I realized I have left webrick running for several days while playing with
this. I decided to restart and it error out with this:

$ ./script/server webrick
=> Booting WEBrick...
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in
`load_missing_constant': uninitialized constant ActionMailer (NameError)
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in
`const_missing'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
`const_missing'
        from ./script/../config/../config/environment.rb:15
        from /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:41:in
`run'
        from ./script/../config/../config/environment.rb:13
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
         ... 8 levels...
        from /usr/lib/ruby/gems/1.8/gems/rails-1.2.3
/lib/commands/server.rb:39
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from ./script/server:3

Is ActionMailer a gem I have to install?

-j


On 9/18/07, Craig White <craigwhite at azapple.com> wrote:
>
> again, as far as ruby on rails ActionMailer is concerned, sendmail is
> unnecessary if you simply set up config/environment.rb to include (at
> bottom is fine)
>
> # Include your app's configuration here:
> ActionMailer::Base.server_settings = {
>   :address  => "smtp.west.cox.net"
>   :port  => 25,
>   :domain  => "anything_you_wish"
>   #:user_name  => "me at postoffice.net",
>   #:password  => "mypass",
>   #:authentication  => :login
>     }
>
> Craig
>
> On Tue, 2007-09-18 at 22:07 -0700, Josh Coffman wrote:
> > Ok, I'm not sure whether it matters, but I'm trying to send mail to a
> > non-local address. the one i'm writing from for instance.
> > Anyway, I think I still have some work to do with sendmail. Because I
> > use cox, I think I have to setup sendmail as a relay to the cox mail
> > server.
> >
> > I'll post any progress. tips are appreciated.
> >
> > -j
> >
> >
> > On 9/18/07, Craig White <craigwhite at azapple.com> wrote:
> >         mail --help
> >
> >         mail craig -s "This is a subject" < /home/craig/some_file.txt
> >
> >         Craig
> >
> >         PS action mailer is pretty simple and you can use an smtp
> >         server so
> >         local smtp is unnecessary
> >
> >         On Tue, 2007-09-18 at 18:15 -0700, Josh Coffman wrote:
> >         > sendmail wasn't started...
> >         > anyone know how to send email via command line/script on
> >         fedora?
> >         > I'd like to test that the mail server works, before assuming
> >         its my
> >         > rails app.
> >         >
> >         > thanks,
> >         > -j
> >         >
> >         >
> >         > On 9/18/07, Derek Neighbors <derek at gnue.org> wrote:
> >         >         Come to rails meeting tonight and I can help you
> >         out.
> >         >         ActionMailer
> >         >         is way to go.
> >         >
> >         >         http://wiki.rubyonrails.org/rails/pages/ActionMailer
> >         >
> >         >         --
> >         >         Derek
> >         >
> >         >         On 9/18/07, Josh Coffman < joshcoffman at gmail.com>
> >         wrote:
> >         >         > Hi all,
> >         >         >
> >         >         >    Anyone know how to send email from rails on
> >         linux? I've
> >         >         tried a couple
> >         >         > articles I found via google, but no luck so far. I
> >         may be
> >         >         missing something
> >         >         > on linux, like a running mail daemon or something.
> >         If you've
> >         >         setup rails to
> >         >         > send email on linux, please tell me how.
> >         >         >
> >         >         >
> >         >         > Thanks,
> >         >         > -j
> >         >         >
> >         >         > _______________________________________________
> >         >         > PLUG-devel mailing list  -
> >         >         > PLUG-devel at lists.PLUG.phoenix.az.us
> >         >         >
> >         http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >         >         >
> >         >         >
> >         >         _______________________________________________
> >         >         PLUG-devel mailing list  -
> >         >         PLUG-devel at lists.PLUG.phoenix.az.us
> >         >
> >         http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >         >
> >         > _______________________________________________
> >         > PLUG-devel mailing
> >         list  -  PLUG-devel at lists.PLUG.phoenix.az.us
> >         > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >
> >         _______________________________________________
> >         PLUG-devel mailing
> >         list  -  PLUG-devel at lists.PLUG.phoenix.az.us
> >         http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >
> > _______________________________________________
> > PLUG-devel mailing list  -  PLUG-devel at lists.PLUG.phoenix.az.us
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>
> _______________________________________________
> PLUG-devel mailing list  -  PLUG-devel at lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.PLUG.phoenix.az.us/pipermail/plug-devel/attachments/20070918/2797ac26/attachment.htm 


More information about the PLUG-devel mailing list