Sha256: baa8df24181a2bdab943b77df4ef9f616bdbc214c493f8d905b2306c0598c51e
Contents?: true
Size: 735 Bytes
Versions: 32
Compression:
Stored size: 735 Bytes
Contents
#!/usr/bin/env ruby a= ('a' .. 'z').to_a a += ('A' .. 'Z').to_a a += (0 .. 9).to_a foo = (((0..199).to_a.map do |i| a.sample.to_s end).join) main_text = <<EOF From: <gregorycohenvideos@gmail.com> To: gregorycohenvideos@gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="#{foo}" --#{foo} Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit\n\nMessage\n EOF for arg in ARGV; file_text = File.read arg if file_text == foo raise end main_text += <<EOF --#{foo} Content-Disposition: attachment; filename="#{arg}" Content-Type: text/plain #{file_text} EOF end main_text += "--#{foo}--" puts main_text IO.popen("himalaya send", "w") do |f| f.print main_text.gsub("\n", "\r\n") end
Version data entries
32 entries across 31 versions & 6 rubygems