I have a small script that sends an email to several users.
Until now there are no problems. The problems start to appear if I want to send an email to the currently logged in user, based on their privilege:PHP Code:$to = $email1 . ", " . $email2 . ", " . $email3;
$subject = "Subject";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = ''; // HTML message
mail($to,$subject,$message,$headers);
Now if I click on the form button, I don't receive any more emails and the redirect to the homepage fails with a "File not found error", telling me to check that the filename doesn't contain uppercase letters or typos and to check if the file was moved, renamed or deleted.PHP Code:// This section comes right after the first part above
if ($_SESSION['privilege'] < 2) {
$message = '';
} else {
$message = ''; // different HTML message
}
mail($useremail,$subject,$message,$headers);
header('Location: home.php');
Do you have any idea why this is happening?



Reply With Quote


Bookmarks