There's a subframework within Rails, Action Mailer, that is used to send/receive emails.
Try using script/generate mailer <mailername> <mail action> <mail action2> for a quick review.
catch it before it slithers away! Oh wait, it's a tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book