View Single Post
Old 2002-05-15, 15:30
wacko's Avatar
wacko wacko is offline
Magic Ball Master
Join Date: Oct 2000
Posts: 9,927
Ontopic post (I know I'm late): you can also have PHP send an email to all users, instead of using an email program. A simple example of a PHP mailer:

PHP Code:
<head><title>Mail form</title></form><?

// Define all names and email addresses here
$to = "wacko <>" . " , ";
$to .= "SomeOne <>" . " , ";
$to .= "BLAR <>";

// Check if all fields have been filled in and send the mail if it's ok
if($subject&&$from&&$message) {
mail($to, $subject, $message, "From: $from");
echo("Your mail has been sent.<br>&nbsp;<br>");

?><form action="<? echo("$PHP_SELF");?>" method="post">
<b>Subject:</b> <input type="text" name="subject"><br>
<b>Your email address:</b> <input type="text" name="from"><br>
<textarea name="message"></textarea>

The email addresses list could also be automated, like fetched from a database.
Reply With Quote