Mercurial > hgrepos > hgweb.cgi > xsotter
view xsotter_mail.rb @ 6:6c763cb4ea40
change path on xsotter_mail.rb
author | KAMURA Sota <c109047@e.koeki-u.ac.jp> |
---|---|
date | Tue, 07 Feb 2012 20:08:20 +0900 |
parents | f1a06832e7de |
children | ef8cc6249d53 |
line wrap: on
line source
#!/home/irhome/c109/c109047/sun4v/ruby/bin/ruby # #! /usr/bin/env ruby # -*- coding: euc-jp -*- require '/home/irhome/c109/c109047/xsotter/xsotter_class' sender = ENV['SENDER'] rcpt = ENV['RECIPIENT'] body = "" #Array.new if sender == nil || rcpt === nil exit 0 elsif/.*@.*/ !~ sender exit 0 end while line = gets f=1 if /^$/=~line if f ==1 body += line end end body = NKF.nkf('-e', body) com=["-T", body] #com=["-T", "test"] xsotter=Xsotter.new("/home/irhome/c109/c109047/xsotter/c109047_token") xsotter.comand(com)