Hi, I have a really simple mailing script.It works, but it sends the message twice. How do I send the mail once.
<?php
$email = 'example@domain.com';
$subject = 'MESSAGE FROM DOMAIN!';
$message = 'The Message Was Successfully Sent!';
$headers = 'From: noreply@domain.com' . "\r\n" .
'Reply-To: reply@domain.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
?>
<?php
if(@mail($email, $subject, $message, $headers))
{
echo "Mail Sent Successfully";
}else{
echo "Mail Not Sent";
}
?>