File: /var/www/sites/fibrohealing.reocell.com/test.php
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$to = $_POST["to"];
$fromName = $_POST["from"];
$fromEmail = $fromName . $_POST["domain"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$quantity = $_POST["quantity"];
$from = "$fromName <$fromEmail>";
$headers = "From: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=utf-8\r\n";
for ($i = 0; $i < $quantity; $i++) {
if (mail($to, $subject, $message, $headers)) {
echo "ok";
} else {
echo "no ok";
}
}
}
?>