frozenpeas
Technical User
When I use a PHP script to send email, it works unless the sender and recipient are identical. Is this normal?
Thanks.
frozenpeas
Thanks.
frozenpeas
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
$sender = $_SESSION['uname'];
$query = mysql_query("SELECT * FROM admin WHERE username = '$sender'") or die ('Could not query database: '.mysql_error());
while ($row = mysql_fetch_array($query)){
$header = "From: ".$row['name']."<".$row['email'].">"."\r\n"
."Reply-To: ".$row['email']."\r\n"
."\"MIME-Version: 1.0\"\r\n"
."Content-Type: text/plain;";
$boundary = uniqid("EMAIL");
$toaddress = $_POST['select'];
$subject = $subject;
$mailcontent = $message
."\n".'--'."\n"
.'This message was submitted by '.$_SESSION['uname'].' from '.$REMOTE_ADDR.'."\n";
mail($toaddress, $subject, $mailcontent, $header);
}