home *** CD-ROM | disk | FTP | other *** search
/ Internet 1996 World Exposition / park.org.s3.amazonaws.com.7z / park.org.s3.amazonaws.com / Pavilions / BrainOpera / cgi-bin / mailing-send-text.cgi < prev    next >
Text File  |  2017-09-21  |  2KB  |  67 lines

  1. #!/usr/local/bin/perl
  2.  
  3. # Script written by Ben (benjamin@media.mit.edu)
  4. # This script simply takes care of subscribing a person to the mailing list
  5. # Currently, this is done by sending mail to benjamin@media.mit.edu
  6. # soon, it will be automated with majordomo.
  7. # Brain Opera, MIT Media Lab
  8.  
  9. do 'cgi-hacks.pl';
  10. do 'mail-utilities';
  11. do 'user_info.pl';
  12.  
  13. require 'flush.pl';
  14.  
  15. &find_form_args("name|email|interests");
  16.  
  17. sub html_header { 
  18.     print "Content-type: text/html\n\n";
  19.     &flush(STDOUT);
  20.     }
  21.  
  22.  
  23.  
  24. $subject = "NEW BRAINOP SUBSCRIBER";
  25. $user_info=&get_user_info();
  26. $message = "NEW SUBSCRIBER : $name $email\n
  27. INTERESTS: $interests\n
  28. USER INFO: $user_info";
  29.  
  30.  
  31. # Send mail to webmaster
  32. &mailer("$name","$email","Brain Opera Webmaster","webmaster@brainop.media.mit.edu","$subject","$message");
  33.  
  34. # Send mail to user to welcome him to mailing list
  35. open(welcome,"/users/benjamin/welcome.txt");
  36. @input=<welcome>;
  37. $welcome_text="@input";
  38. close(welcome);
  39.  
  40. # Append the email address to the list of members
  41. open(list,">> /users/benjamin/lists/mailing-list");
  42. print list "$email\n";
  43. close(list);
  44.  
  45. # Send mail to the person and send the welcome message
  46. &mailer_user("The Brain Opera Web Master","webmaster@brainop.media.mit.edu","$name","$email","Welcome !","$welcome_text");
  47.  
  48. &html_header;
  49. print "<HTML><HEAD><TITLE>Welcome to the Brain Opera Mailing List</TITLE></HEAD>
  50. <BODY>
  51. <center><h1>Welcome to <br>the Brain Opera Mailing List</h1>
  52. <hr>
  53. <h2>
  54. Your email address has been added to our mailing list.<br>
  55. You should soon receive an email confirming your presence on the list. Meanwhile, feel free to continue<br>
  56. <a href=\"/text-site/intro/textintro.html\">browsing our site</a>.</font>
  57. <hr size=3>
  58. <address>webmaster@brainop.media.mit.edu</address></BODY></HTML>";
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.