Mercurial > hgrepos > hgweb.cgi > after5
comparison after5.rb @ 80:5381d9b4adb5 draft
Correct date format for SMTP.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 05 Mar 2013 15:22:30 +0900 |
parents | 1acd9c926bd6 |
children | abf46a970b21 |
comparison
equal
deleted
inserted
replaced
79:1acd9c926bd6 | 80:5381d9b4adb5 |
---|---|
1 #!/usr/local/bin/ruby19 | 1 #!/usr/local/bin/ruby19 |
2 # -*- coding: euc-jp -*- | 2 # -*- coding: euc-jp -*- |
3 # | 3 # |
4 # Associative Scheduling Table - after5 | 4 # Associative Scheduling Table - after5 |
5 # (C)2003, 2004, 2006, 2008, 2012 by HIROSE Yuuji [yuuji<at>gentei.org] | 5 # (C)2003, 2004, 2006, 2008, 2012, 2013 by HIROSE Yuuji [yuuji<at>gentei.org] |
6 # $Id: after5.rb,v 1.20 2012/12/03 15:54:20 yuuji Exp $ | 6 # $Id: after5.rb,v 1.20 2012/12/03 15:54:20 yuuji Exp $ |
7 # Last modified Tue Dec 4 00:53:29 2012 on firestorm | 7 # Last modified Tue Mar 5 15:21:30 2013 on firestorm |
8 # See http://www.gentei.org/~yuuji/software/after5/ | 8 # See http://www.gentei.org/~yuuji/software/after5/ |
9 # このスクリプトはEUCで保存してください。 | 9 # このスクリプトはEUCで保存してください。 |
10 $hgid = <<_HGID_.split[1..-2].join(" ") | 10 $hgid = <<_HGID_.split[1..-2].join(" ") |
11 $HGid$ | 11 $HGid$ |
12 _HGID_ | 12 _HGID_ |
1676 from and m.print "From: #{from}\n" | 1676 from and m.print "From: #{from}\n" |
1677 m.print "Subject: #{subject}\n" | 1677 m.print "Subject: #{subject}\n" |
1678 m.puts "Mime-Version: 1.0 | 1678 m.puts "Mime-Version: 1.0 |
1679 Content-Transfer-Encoding: 7bit | 1679 Content-Transfer-Encoding: 7bit |
1680 Content-Type: Text/Plain; charset=iso-2022-jp" | 1680 Content-Type: Text/Plain; charset=iso-2022-jp" |
1681 m.puts "Date: #{Time.now.strftime("%a, %d %Y %T %z")}" | 1681 m.puts "Date: #{Time.now.strftime("%a, %d %B %Y %T %z")}" |
1682 m.print "\n" | 1682 m.print "\n" |
1683 end | 1683 end |
1684 m.print body, "\n" | 1684 m.print body, "\n" |
1685 m.close | 1685 m.close |
1686 else | 1686 else |