home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / cgi-bin / Japan / Theme / theme_add_mail.pl < prev    next >
Perl Script  |  2017-09-21  |  2KB  |  78 lines

  1. #!/usr/local/bin/perl
  2.  
  3. $| = 1;
  4. # theme_add_mail.pl
  5. # Registration for sensorium update news mailing list 
  6. # haruki@st.rim.or.jp
  7. # 96/04/30
  8. #
  9. # THIS CODE INCLUDES THESE LIBRARIES
  10. #
  11. #   cgi-lib.pl  Copyright 1994 Steven E. Brenner
  12. #
  13.  
  14. # jrh
  15. $CgiPath      = '/stage/htdocs/cgi-bin/Japan/Theme/NEW';
  16. push(@INC, "$CgiPath");
  17. $ThisFile = '/stage/htdocs/cgi-bin/Japan/Theme/theme_add_mail.pl';
  18.  
  19. require 'cgi-lib.pl';
  20.  
  21. &ReadParse(*in);
  22.  
  23. #
  24. # ôoÿ^âAâhâîâXé¬ï≤é╚éτÅIù╣
  25. #
  26. if (!$in{'address'}) {
  27.     &err("Sorry, your comment seems contains no data.\n");
  28. }
  29.  
  30. #
  31. # ╞■╬╧ñ╡ñ∞ñ┐ñΓñ╬ñ¼Ñßí╝ÑδÑóÑ╔Ñ∞Ñ╣ñ½ñ╔ñªñ½Ñ┴ѺÑ├Ñ»
  32. #
  33. if (!($in{'address'} =~ /(.*)\@(.*)/) ||
  34.     !($in{'address'} =~ /\w$/)) {
  35.     &err("Sorry, you input invalid e-mail address. Try once more.\n");
  36. }
  37.  
  38. #
  39. # âüü[âèâôâOâèâXâgôoÿ^É\ì₧âüü[âïé≡æùéΘ
  40. #
  41. if (open(ML, "| /usr/local/bin/nkf -j | /usr/lib/sendmail -f haruki\@st.rim.or.jp majordomo\@expo96.ad.jp")) {
  42.     print ML "From: haruki\@st.rim.or.jp \n";
  43.     print ML "X-Mailer: theme_add_mail.pl\n";
  44.     print ML "\n";
  45.     print ML "approve Yumiko-Haruki subscribe sensors $in{'address'}\n";
  46. }
  47. close(ML);
  48.  
  49. #
  50. # ôoÿ^ÅIù╣ëµû╩
  51. #
  52. print "Content-type: text/html\n\n";
  53. print "<html><head>\n";
  54. print "<title>result</title>";
  55. print "</head><body bgcolor=\"#ffffff\">\n";
  56. print "<center><h3><p>éáéΦé¬é╞éñé▓é┤éóé▄é╖üB\n";
  57. print "<br>éáé╚é╜é╠âüü[âïâAâhâîâXé≡";
  58. print "âèâXâgé╔Æ╟ë┴é╡é▄é╡é╜üB</p>\n";
  59. print "<p>Thank you!<br>Your mail address has added to list.";
  60. print "</a></p></h3></center>\n";
  61. print "</body><hr><address>theme pavilion \@IWE╒96 JAPAN</address></html>\n";
  62. exit;
  63.  
  64.  
  65. #
  66. # âGâëü[é╠ÅΩìç
  67. #
  68. sub err{
  69.     local($msg) = @_;
  70.     print "Content-type: text/html\n\n";
  71.     print "<html><head>\n";
  72.     print "<title>result</title>";
  73.     print "</head><body bgcolor=\"#ffffff\">\n";
  74.     print "<p>$msg</p>\n";
  75.     print "</BODY></HTML>\n";
  76.     exit;
  77. }
  78.