i also have the same problem, this is my script:
<?php $comments = trim($comments);if (!empty($comments)) {
if($user=="") {$user="Guest";}
$mailto = "Webmaster <webmaster@review-music.com>";
$msubject = "Quick Comments";
$mbody = "$comments\n";
$mbody .= "--------------\n";
$mbody .= "Browser: $type\n";
$mbody .= "User: $user\n";
$mbody .= "URL: $url\n";
$mheader = "From: Customer Accounts <customer-accounts@review-music.com>";
mail($mailto, $msubject, $mbody, $mheader);
Header("Location: http://www.review-music.com$url");}else{
Header("Location: http://www.review-music.com$url");}
?>
The form is just one textarea field with the name comments. There are also three hidden input types: type, url and user.
This script worked fine on my last server but I have just changed to a dedicated server (Cobalt RaQ4) running PHP 4.1.2 and now it doesn't mail at all.
The strange thing is in my admin script I can send mail out. This is the script:
<?php if ($mail) {
$to = $to_name ."<".$to_email.">";
$msubject = $mail_subject;
$mail_message = stripslashes($mail_message);
$mbody = $mail_message;
$mheader = "From: $from_name <$from_email>\nContent-Type: text/plain\nBcc: sentitems@review-music.com";
mail($to, $msubject, $mbody, $mheader);
}
?>
and the form:
<table><form method="post" action="<?PHP echo"$PHP_SELF";?>">
<tr><td><span class="whatsnew"><b>To Name</b></td><td><input type="text" name="to_name"></td></tr>
<tr><td><span class="whatsnew"><b>To Email</b></td><td><input type="text" name="to_email"></td></tr>
<tr><td><span class="whatsnew"><b>From Name</b></td><td><input type="text" name="from_name"></td></tr>
<tr><td><span class="whatsnew"><b>From Email</b></td><td><input type="text" name="from_email"></td></tr>
<tr><td><span class="whatsnew"><b>Subject</b></td><td><input type="text" name="mail_subject"></td></tr>
<tr><td valign="top"><span class="whatsnew"><b>Message</b></td><td><textarea name="mail_message" rows="10"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" value="Send Mail" name="mail"></td></tr>
</form></table>
Does anyone have any ideas