Skip to content

Instantly share code, notes, and snippets.

@yuumi3
Created April 6, 2017 01:25
Show Gist options
  • Save yuumi3/6fe8f4469686a2a5dd5a2cd288e1e9fa to your computer and use it in GitHub Desktop.
Save yuumi3/6fe8f4469686a2a5dd5a2cd288e1e9fa to your computer and use it in GitHub Desktop.
Send Radiko recorded mail
#!/usr/bin/env ruby
def mail(to_addr, subject, body)
open("|mail -s '#{subject}' #{to_addr}", "w") {|io| io.puts body}
end
file_name = ARGV[0]
mail 'yy@ey-office.com', "Radiko 録音完了 #{file_name}" ,
"Download http://ey-office.net/radiko/#{file_name}.mp3\r\n" +
"Download http://ey-office.net/radiko/#{file_name}.flv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment