Decode raw text/plain email
# gem install mail require 'rubygems' require 'mail' mail = Mail.new(open("body.txt").read) print mail.text_part.decode_body