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.cgi < prev    next >
Text File  |  2017-09-21  |  2KB  |  62 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. $sender_name="NEW subscriber : Brain Opera";
  23. $sender_email="webmaster@brainop.media.mit.edu";
  24. $recipient_name="Brain Opera Webmaster";
  25. $recipient_email="webmaster@brainop.media.mit.edu";
  26. $subject="NEW BRAINOP SUBSCRIBER";
  27. $message="NEW SUBSCRIBER : $name
  28. EMAIL ADDRESS : $email
  29.  
  30. SPECIAL INTERESTS : 
  31. $interests";
  32.  
  33. $user_info=&get_user_info();
  34.  
  35. # Send mail to webmaster
  36. &mailer("$sender_name","$sender_email","$recipient_name","$recipient_email","$subject","$message","$user_info");
  37.  
  38. # Send mail to user to welcome him to mailing list
  39. open(welcome,"/users/benjamin/welcome.txt");
  40. @input=<welcome>;
  41. $welcome_text="@input";
  42. close(welcome);
  43.  
  44. # Append the email address to the list of members
  45. open(list,">> /users/benjamin/lists/mailing-list");
  46. print list "$email\n";
  47. close(list);
  48.  
  49. # Send mail to the person and send the welcome message
  50. &mailer_user("The Brain Opera Web Master","webmaster@brainop.media.mit.edu","$name","$email","Welcome !","$welcome_text");
  51.  
  52. &html_header;
  53. print "<HTML><HEAD><TITLE>Welcome to the Brain Opera Mailing List</TITLE></HEAD>
  54. <BODY bgcolor=#000000 text=#eeeeee link=#bbbbbb vlink=#bbbbbb>
  55. <center><h1>Welcome to <br>the Brain Opera Mailing List</h1>
  56. <hr size=4 width=40%>
  57. <font size=+2>
  58. Your email address has been added to our mailing list.<br>
  59. You should soon receive an email confirming your presence on the list. Meanwhile, feel free to continue<br>
  60. <a href=\"/home.html\">browsing our site</a>.</font>
  61. <hr size=3>
  62. <address>webmaster@brainop.media.mit.edu</address></BODY></HTML>";