I wonder if a few people could test the attached files on their servers (an HTML form and processing PHP). I don’t get any meaningful error message to tell me what the issue is. Thanks for the help. The PHPcode:
<html>
<head>
<title>Multipart Mail Sent!</title>
</head>
<body>
<?php
$to = $_POST["to"];
$cc = $_POST["cc"];
$bcc = $_POST["bcc"];
$from = $_POST["from"];
$subject = $_POST["subject"];
$messagebody = $_POST["message"];
$boundary = "==MP_Bound_xyccr948x==";
$headers = "MIME-Version: 1.0
";
$headers .= "Content-type: multipart/alternative; boundary=\"$boundary\"
";
$headers .= "CC: " . $cc . "
";
$headers .= "BCC: " . $bcc . "
";
$headers .= "From: " . $from . "
";
$message = "This is a Multipart Message in MIME format
";
$message .= "--$boundary
";
$message .= "Content-type: text/html; charset=iso-8859-1
";
$message .= "Content-Transfer-Encoding: 7bit
";
$message .= $messagebody . "
";
$message .= "--$boundary
";
$message .= "Content-Type: text/plain; charset=\"iso-8859-1\"
";
$message .= "Content-Transfer-Encoding: 7bit
";
$message .= $messagebody . "
";
$message .= "--$boundary--";
$mailsent = mail($to, $subject, $message, $headers);
if ($mailsent) {
echo "Congrats! The following message has been sent: <br><br>";
echo "<b>To:</b> $to<br>";
echo "<b>From:</b> $from<br>";
echo "<b>Subject:</b> $subject<br>";
echo "<b>Message:</b><br>";
echo $message;
} else {
echo "There was an error...";
}
?>
</body>
</html>