PHP Mail() send 31 emails at a time
Hello everyone
I have this script for my contact us page
<?php
$to = "123@yahoo.com";
$subject = $_REQUEST['subj'] ;
$name = $_REQUEST['name'] ;
$org = $_REQUEST['org'] ;
$tele = $_REQUEST['tele'] ;
$city = $_REQUEST['city'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$url = "Karwan - Contact Form";
$details = "\n URL - Form: $url\n
Subject: $subject\n
Name: $name\n
Organization: $org\n
Telephone: $tele\n
City: $city\n
From: $email \n
Message: $message \n
";
$headers = "From: $email";
$sent = mail($to, $url, $details, $headers, $message) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
When a user fill the form and send it to me, I receive 31 messages in my inbox.
Is there something wrong in my code?
Regards