# cat /usr/lib/cgi-bin/hoge #!/bin/bash if [ -n "$HTTP_HOST" ] ; then echo -e "Content-Type: text/html; charset=UTF-8\r\nPragma: no-cache\r\nCache-Control: no-cache, must-revalidate\r\nExpires: Thu, 01 Dec 1994 16:00:00 GMT\r\n\r\n" fi read args echo $args | perl -MURI::Escape -lne 'print uri_unescape($_)' | /usr/bin/mail -s "`basename $0`" example@example.com
参考
http://blog.cles.jp/item/3889
http://nicomelmo.blog118.fc2.com/blog-entry-929.html
CGI環境変数
http://www.scollabo.com/banban/cgi/cgi_017.html