Here is the really simple script to mail from ruby. Here i assumed that your system is configured with ruby, all need gems and SMTP.
Substitute the Sender's email and recipient's email.
Don't put any space or other character at the begining of the line inside message heredoc (ie., don't use indentation in that)
Save the script in a file for Eg:rubymailer.rb and run ruby rubymailer.rb
Happy mailing