Hi i have declared action mailer in my ruby file. am sending mail
but while sending giving error is
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:77:
command not found: /usr/sbin/sendmail -i -t
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:692:in
write': Broken pipe (Errno::EPIPE) from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:692:in
print’
from
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:692:in
perform_delivery_sendmail' from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:691:in
popen’
from
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:691:in
perform_delivery_sendmail' from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in
send’
from
/usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in
deliver!' from /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:395:in
method_missing’
from daemon.rb:101
My code is declaerd as
class Notification < ActionMailer::Base
def deal_cancel_mailer
recipients “[email protected]”
from “[email protected]”
subject “my subject”
body :variable1 => 'a', :variable2 => 'b'
end
end
Notification.template_root = File.dirname("/home/lakshmi/Aptana Studio
Workspace/groupbuy/app/views/notification")
Notification.delivery_method = :sendmail
Notification.logger = Logger.new(STDOUT)
this sends the email
Notification.deliver_deal_cancel_mailer
can anybody help