help with mail() again
Posted: Thu Feb 23, 2006 2:20 pm
This dosnt seem to work im not sure why
its inside of a query, I tried echoing the variables out and they seem to work, and it says 'Message Sent' when I email it, im not sure why this wont work. any help would be great.
Code: Select all
<?PHP
$to = $row['from'];
$subject = 'Re: ';
$subject .= $row['subject'];
$message = $_POST['message'];
if (mail('$to', '$subject', '$message', 'From: $admine')) {
echo 'Message Sent';
$emailform = 'no';
}
else {
echo 'Sorry, an unexpected has occured.';
}
?>