Skip to content

Instantly share code, notes, and snippets.

@komagata
Created February 5, 2011 15:35
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 komagata/812535 to your computer and use it in GitHub Desktop.
Save komagata/812535 to your computer and use it in GitHub Desktop.
MTA *sending only*
#!/usr/bin/env ruby
to = ARGV[0]
body = ARGV[1]
length = 30
subject = body.split(//u)[0, length].to_s
IO.popen("mail -s '#{subject}' #{to}", 'r+') {|io| io.puts body }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment