Skip to content

Instantly share code, notes, and snippets.

@wolfedale

wolfedale/.rb Secret

Created May 25, 2016 13:54
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 wolfedale/8f32d6db91ce1b7362d353a440d6ff2a to your computer and use it in GitHub Desktop.
Save wolfedale/8f32d6db91ce1b7362d353a440d6ff2a to your computer and use it in GitHub Desktop.
sendmail
def sendmail
ARGV.each { |x| @s.concat("#{x} ") }
IO.popen("/usr/sbin/sendmail -G -i #{@s}", "w") do |pipe|
pipe.puts @mail_content
pipe.close_write
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment