You are using the mail() function wrong in both examples, try this for the second one:
this one i tested.
AND ITS VERY INSECURE, don't use it on a production server/website!
P.S. if the first one worked, even if you use the wrong variables in the mail() function you can say it issent a server problem.
I think..
PHP Code:
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$contact=$_REQUEST['contact'];
$service=$_REQUEST['service'];
$budget=$_REQUEST['budget'];
$company=$_REQUEST['company'];
$message=$_REQUEST['message'];
if (($name=="")||($email=="")||($contact=="")||($service=="")||($budget=="")||($company=="")||($message=="")){
echo "All fields are required, please fill <a href=\"\">the form</a> again.";
}else{
$to = "quotes@mydomain.co.za";
$subject = "the subject";
$message2 = "name: $name \r\n".
"E-mail: $email \r\n".
"Contact: $contact \r\n".
"service: $service \r\n".
"budget: $budget \r\n".
"Company: $company \r\n".
"message: $message";
$headers = "From: $name <$email>\r\nReturn-path: $email"
."X-Mailer: PHP/" . phpversion();
if(mail($to, $subject, $message2, $headers)){
echo "Sent!";
}else{
echo "fail!";
}
}
AND ITS VERY INSECURE, don't use it on a production server/website!
P.S. if the first one worked, even if you use the wrong variables in the mail() function you can say it issent a server problem.
I think..
●
● My Sentora Demo ● My Github ● Auxio Github ●
● Zentora theme ● S-Type theme ● CstyleX theme ●
● flat-color-icons ● small-n-flat-icons ●
●
Sentora's development takes way too long, so i'm transitioning to HestiaCP.
● My Sentora Demo ● My Github ● Auxio Github ●
● Zentora theme ● S-Type theme ● CstyleX theme ●
● flat-color-icons ● small-n-flat-icons ●
●
Sentora's development takes way too long, so i'm transitioning to HestiaCP.