comparison 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
comparison
equal deleted inserted replaced
5:f1a06832e7de 6:6c763cb4ea40
1 #! /usr/bin/env ruby 1 #!/home/irhome/c109/c109047/sun4v/ruby/bin/ruby
2 # #! /usr/bin/env ruby
2 # -*- coding: euc-jp -*- 3 # -*- coding: euc-jp -*-
3 4
4 require '/home/irhome/c109/c109047/xsotter/xsotter_class' 5 require '/home/irhome/c109/c109047/xsotter/xsotter_class'
5 =begin 6
6 sender = ENV['SENDER'] 7 sender = ENV['SENDER']
7 rcpt = ENV['RECIPIENT'] 8 rcpt = ENV['RECIPIENT']
8 body = ""#Array.new 9 body = "" #Array.new
9 if sender == nil || rcpt === nil 10 if sender == nil || rcpt === nil
10 exit 0 11 exit 0
11 elsif/.*@.*/ !~ sender 12 elsif/.*@.*/ !~ sender
12 exit 0 13 exit 0
13 end 14 end
15
14 while line = gets 16 while line = gets
15 f=1 if /^$/=~line 17 f=1 if /^$/=~line
16 if f ==1 18 if f ==1
17 body += line 19 body += line
18 end 20 end
19 end 21 end
20 STDERR.puts NKF.nkf('-e', body) 22 body = NKF.nkf('-e', body)
21 com=["-T", body] 23 com=["-T", body]
22 =end 24
23 com=["-T", "post test"] 25 #com=["-T", "test"]
24 xsotter=Xsotter.new("~/xsotter/c109047_token") 26 xsotter=Xsotter.new("/home/irhome/c109/c109047/xsotter/c109047_token")
25 xsotter.comand(com) 27 xsotter.comand(com)

yatex.org