View Single Post
  #8  
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:
<html>
<head><title>Mail form</title></form><?

// Define all names and email addresses here
$to = "wacko <bauk@gmx.net>" . " , ";
$to .= "SomeOne <some@one.net>" . " , ";
$to .= "BLAR <blar@blar.com>";

// 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>
<b>Message:</b><br>
<textarea name="message"></textarea>
</form>

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