how to send mail through ruby on rails

Plz tell me the code to send mail from ruby on rails.I have googled
many times but couldn't find a proper solution.

Railscasts is a great place to start looking for anything you wish to know pertaining to development in Ruby on Rails.

This episode http://railscasts.com/episodes?search=actionmailer demonstrates how to go about the setting up everything for being able to send emails.

For further information you should google for ActionMailer.

Thanks & Regards,
Dhruva Sagar.