////////////////////////////////////////////////
//                                            //
//                 PHPMailList                //
//                 Version 1.0a               //
//                                            //
//                Copyright 2001              //
//                 David Broker               //
//               php@warpedweb.net            //
//             All Rights Reserved            //
//                                            //
//     This script may be used and modified   //
//            freely as long as this          // 
//          copyright remains intact.         //
//                                            //
//          http://php.warpedweb.net/         //
//                                            //
////////////////////////////////////////////////

README for PHPMailList Version 1.0a

CONTENTS:

 - About
 - Included Files
 - Usage
   - Requirements
   - Installion
   - Using the scripts
 - Change log
 - To do

+-------+
| About |
+-------+

A script which allows you to send newsletters, announcements 
to a list of subscribed email addresses. 
It features webbase subscription and administration to send messages &
review subscribers. 
It uses a text database to hold the addresses.

+----------------+
| Included Files |
+----------------+

 Here is a list of files that should be included in this distribution:
  1. readme.txt
      This file.  
  2. maillist.php
      The php script which controls the mailing and subscriptions.
  3. list.dat
      The file where the email addresses are stored.
  
+-------+
| Usage |
+-------+

REQUIREMENTS

1. PHP Version 4.0.2 or greater.
   This is needed because of the functions used in the script are not
   valid in PHP3
2. MAIL Options must be configured correctly on your server. This this
   address http://www.php.net/manual/en/function.mail.php if you need more
   information or contact your system's administrator for more info.
3. VERY basic knowledge of PHP.
   This is required to install the script. You need to edit a few 
   lines of the script, all of which is described in detail.

INSTALLATION

1. Configure the scripts:

In maillist.php there are a number lines which need to be edited tp configure you script:
 1. Set the username and passowrd to access the admin function
          $user = "Bob";
          $pass = "Bill123";
 2. Full server path to list.dat
    If using Windows make sure to use double back slashes for server paths.
     EG:  $list_file = "c:\\www\\list.dat";
          $file_file = "/home/user/maillist/list.dat";
 3. The name of your list:
     EG:  $list_name = "My Mailing List";
 4. Your email address, the address all mailings will come from:
     EG:  $owner_email = "me@myhost.com";

** Everything below this can be left as its default. It does not NEED to be changed. **

 5. Send a welcome message on subscription. Yes: 1 No: 0
     EG: $send_welcome = "1";
 6. The subject of the welcome message:
     EG: $welcome_subject = "Welcome to $list_name";
 7. The the content of the welcome message:
     EG: $welcome_msg = "The email address: $email has been subscribed to $list_name.
                         Please see below for info about unsubscribing.";
 8. Send a goodbye message on unsubscription. Yes: 1 No: 0
     EG: $send_goodbye = "1";
 7. The subject of the goodbye message.
     EG: $goodbye_subject = "Good bye from $list_name";
 8. The the content of the goodbye message.
     EG: $goodbye_msg = "The email address: $email has been unsubscribed from $list_name";

2. Upload the files and set permissions:
   Upload the files to ther server.
   On a Linux machine you will need to set the index file to be writable 
   by chmod-ing it to 777.
   At the command prompt navigate to the directory of the file andtype:
    chmod 777 search_index.dat
   On a Windows 9X/ME machine there are no permissions to change.

USING THE SCRIPTS

Once you've got the above done, the rest is pretty simple, there are to sections
to the script, the public section and the administration section.

1. Subscribing/Unsubscribing
 There are 2 ways to subscribe/unsubscribe to the list.
 a. Just point your web browser to the script:
     EG: http://www.mysite.com/maillist.php.
    And you will see a subscription form. Just enter your email address to add/remove
    yourself from the list.
 b. You can use a form on another page to send the subscription request. It would look like this:
      <center><font face="verdana,arial,helvetica">Subscribe to:<br><b>My Mailing List</b></font></center>
      <form method="post" action="http://www.path.to/script/maillist.php">
      <table border="0" align="center" cellpadding="0" cellspacing="0">
      <tr><td rowspan="2"><input type="text" name="email" value="Your Email Address" size="20"></td>
      <td><input type="radio" name="action" value="sub" checked><font face="verdana,arial,helvetica" size="-1">&nbsp;Subscribe</font></td></tr>
      <tr><td><input type="radio" name="action" value="unsub"><font face="verdana,arial,helvetica" size="-1">&nbsp;Unsubscribe</font></td></tr>
      <tr><td colspan="2" align="center" valign="center"><input type="submit" value="Submit"></td></tr>

2. Administration
 To access it just go to the URL of the script like so:
  http://path.to/script/maillist.php?action=admin
  Note the "action=admin" this gives you access the the logon screen.
 There are 3 options in the administration module.
 a. Send a message. Pretty simple just type your subject/message in the text
    boxes and press send. Your will be asked to confirm the message before 
    really sending it.
    A copy of the email will be sent to the email address you specified.
 b. View Subscribers. Shows a count and list of subscribed email addresses.
 c. Add/Remove Subscribers. Displays the subscribe form.

Thats all there is to it.

+------------+
| Change Log |
+------------+

18-03-01 V 1.0a
 - Tiny bug fix that caused an error in the data file when someone unsubscribed.

17-03-01 V 1.0
 - Initial release.
 - Subscribe/Unsubscribe to a mailing list.
 - Admin function to send mailings, view subscibers and add/remove people.

+-------+
| To Do |
+-------+

 - More Admin functions (What?).
 - Setting options in admin (welcome subjects, messages, etc.) 

Thanks for download this script, please send and comments, suggestions,
bugs, errors, contribution's to: php@warpedweb.net

David Broker
php@warpedweb.net
http://php.warpedweb.net/