[Backgroundrb-devel] problems with ActionMailer

Michael Siebert info at siebert-wd.de
Mon Aug 7 11:45:35 EDT 2006


try:
in your worker
      require File.dirname(__FILE__) + "../../../config/environment.rb"
      ActionMailer::Base.template_root =
File.expand_path(File.dirname(__FILE__)
+ "../../../app/views")
      NotificationMailer.deliver_daily_report(users, rep, items)

the first line will load environment.rb and rails, initializing your mail
transport
second line defines the template root, since we are in a different working
dir than AM expected
third line... you should see it...

that works for me


2006/8/7, Rolando Abarca <funkaster at gmail.com>:
>
> On 8/7/06, Charles Brian Quinn <me at seebq.com> wrote:
> > what about changing template_root -- it's an actionmailer
> > configuration variable.
>
> yes... that's the first thing I tried. Didn't work either... :-(
>
> --
> rolando -- [[ knowledge is empty, fill it ]] --
> "Tam pro papa quam pro rege bibunt omnes sine lege."
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>



-- 
Michael Siebert <info at siebert-wd.de>

www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060807/d064d835/attachment.html 


More information about the Backgroundrb-devel mailing list