i m trying to send e-mail.
i have generated model, controller & view file for it.
but its giving me error like “No rhtml, rxml, rjs or delegate template
found for sent”
class MyMailer < ActionMailer::Base
recipients “[email protected]”
from “[email protected]”
body “msg”=> msg
msg=“hi from abhi…”
render :text=>“Mail has been sent…!”
<%= start_form_tag(:name => ‘myFrm’, :action => ‘sendmail’)%>
<%= submit_tag “Send Mail”%>
Please help me somebody.
read the section titled ‘Mailer Views’
in a nutshell, rails is looking for apps/views/mymailer/sent.rhtml and
can’t find it.
You need to have an RHTML template for each action of your
ActionMailer model. So in your case, you will need:
What you put in this template is the HTML (in your case) that will be
sent to the user. You have access to the variables you defined in
your sent action, just like any in other view.
Have a look here…