Hi Vivek ~
I can only tell you how I have it setup. Here is an example of all the
"pieces" to get actionmailer working.
rails_root/config/environment.rb
~~~~~~~~~~~~~~~~~~
ActionMailer::Base.server_settings = {
:address => "localhost",
:port => 25,
}
~~~~~~~~~~~~~~~~~~
rails_root/app/controllers/
~~~~~~~~~~~~~~~~~~
def test_message_send
Notifier::sendtest()
end
~~~~~~~~~~~~~~~~~~
rails_root/app/models/notifier.rb
~~~~~~~~~~~~~~~~~~
class Notifier < ActionMailer::Base
def sendtest()
@recipients = "testto@test.com"
@from = "testfrom@test.com"
@subject = "Subject"
@body["first_name"] = "first_test"
@body["last_name"] = "last_test"
end
end
~~~~~~~~~~~~~~~~~~
rails_root/app/views/notifier/sendtest.rhtml
~~~~~~~~~~~~~~~~~~
Hello <%= @first_name %> <%= @last_name %>,
Test Msg...
~~~~~~~~~~~~~~~~~~
Hope this helps.
~ Ben
On 1/11/06, Vivek Krishna <krishna.vivek@gmail.com>
wrote:>
> Hi Ben,
> I am running in development mode. And the error is from the function
> pick_template function of actionview
> "Unable to find any template with .rxml or .rhtml extension "
> I dont remember the exact error messages but thats the approximate thing.
>
>
> I have a MyMailer class in the app/models in a my_mailer.rb file
> with template_path set to "app/views/mails"
> in app/views/mails
> Inside this I have a directory my_mailer and inside it I have the view
> file ''send_invitation_mail.rhtml" in lower case.
> the method name in my_mailer.rb is send_invitation_mail
>
> Still,I will check the case stuff. because it seems like the only possible
> error.
> Or could it be that this bug comes up because I am not using the latest
> 1.0 ?
> Thanks
> Vivek
>
>
>
> On 1/12/06, Ben Reubenstien <benr@x-cr.com> wrote:
> >
> > Hi Vivek ~
> >
> > CaSe sensitivity can only happen in *nix ;) MyFile.rhtml <>
> > myfile.rhtml in linux... but in windows MyFile.txt = myfile.txt.
Anyhow
> > it was worth a shot. I had an issue with Light not finding images
because
> > they were reffered to in the .rhtml as MyImage.gif and on disk they
were
> > myimage.gif.
> >
> > What does your development.log say when the error occurs (I am
assuming
> > you are running in development mode)?
> >
> > ~ ben
> >
> > On 1/11/06, Vivek Krishna <krishna.vivek@gmail.com> wrote:
> > >
> > > I am running this on Linux FC3. Whats the case sensitivity
> > > issue?Anyway I dont think that happens here because this is
Linux.
> > >
> > > I noticed in irb that the render_file in actionview::base doesnt
get
> > > the full path. In WEBrick it doesnt even seem to traverse that
path.
> > >
> > >
> > > On 1/12/06, Ben Reubenstien < benr@x-cr.com> wrote:
> > > >
> > > > What OS are you running on? Could be a CaSe sensitivity
issue that
> > > > Apache has... But no I have not noticed this and have had
actionmailer work
> > > > with Light, Apache, and Webrick.
> > > >
> > > > ~ Ben
> > > >
> > > > On 1/11/06, Vivek Krishna <krishna.vivek@gmail.com>
wrote:
> > > >
> > > > > Hi ,
> > > > > I have actionamailer working properly with a template
and a
> > > > > model for creating the mail object etc. The whole thing
works correctly if I
> > > > > use Webrick.but when I use it on Apache,i get the error
which says
> > > > > "template missing".rails is unable to find
the template for the mailer
> > > > > object.Has anyone noticed this?
> > > > > Vivek
> > > > > PS:I am still not using the 1.0 version
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Rails mailing list
> > > > > Rails@lists.rubyonrails.org
> > > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Ben Reubenstein
> > > > benr@x-cr.com
> > > > _______________________________________________
> > > > Rails mailing list
> > > > Rails@lists.rubyonrails.org
> > > > http://lists.rubyonrails.org/mailman/listinfo/rails
> > > >
> > > >
> > > >
> > >
> >
> >
> > --
> > Ben Reubenstein
> > benr@x-cr.com
> >
>
>
--
Ben Reubenstein
benr@x-cr.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060112/fc394bb7/attachment.html