Файл: mailist/sendit.php
Строк: 35
<?php include("inc/bouncer.php"); ?>
<link href="css/style.css" rel="stylesheet" type="text/css">
<br>
<center>
<img src="css/logo.gif" alt="Maillist">
<br><br>- There are 3 people in the maillist. -<br>
<a href="admin.php" title="Back">Back</a>
<div id="container">
<fieldset>
<legend>Messaging</legend>
<?php
@set_time_limit(0); // Turn off limit (if allowed)
$line = file('maillist.php'); // Array the list of names
$line[0] = $_POST['email']; // Send a copy of letter to owner
$header = file_get_contents('assets/header.txt'); // Load header
$footer = file_get_contents('assets/footer.txt'); // Load footer
$email = $_POST['email']; // Load email
$subject = $_POST['subject']; // Load subject
$body = $header."<br><br>".$_POST['elm2']."<br><br>--------<br><br>".$footer; // Construct message
foreach ($line as $line) {
$to = str_replace("<br>", "", $line);
$headers = "Content-type: text/html; charset=iso-8859-1rn";
$headers .= "From: ".$email."rn" ."X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
echo("Message sent to $to<br>"); // If successfull
} else {
echo("Message sending failed for $to<br>"); // If failed
}
} // Done
?>
</fieldset>
</div>