Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Created February 12, 2014 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxdna/8958070 to your computer and use it in GitHub Desktop.
Save tuxdna/8958070 to your computer and use it in GitHub Desktop.
decode the multi-part messages
#!/usr/bin/ruby1.8
## decode the multi-part messages
require 'rubygems'
require 'mail'
if ARGV[0].nil?
puts "No filename for processing"
else
mail = Mail.read(ARGV[0])
print mail.parts[0].decoded
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment