Mercurial > hgrepos > hgweb.cgi > xsotter
view xsotter_mail.rb @ 0:b79b888eceac
init
author | KAMURA Sota <c109047@e.koeki-u.ac.jp> |
---|---|
date | Mon, 06 Feb 2012 17:25:58 +0900 |
parents | |
children | f1a06832e7de |
line wrap: on
line source
#! /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 STDERR.puts NKF.nkf('-e', body) body=["-T", body] Xsotter.new(body)