Skip to content

Instantly share code, notes, and snippets.

@zph
Created February 21, 2013 03:37
Show Gist options
  • Save zph/5001831 to your computer and use it in GitHub Desktop.
Save zph/5001831 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'gmail'
input = "#{ARGV.join(" ")}"
USER, PASSWORD = File.read(File.expand_path( "~/.gmailrc" )).split("\n")
Gmail.new(USER, PASSWORD) do |gmail|
gmail.deliver do
to USER
subject input
body ""
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment