Why don't you use mailer from Rails?