Hello, I am not too familiar with code and stuff but I have a website and a contact from, I used a template from bootstrap, I have added a few custom feilds such as drop downs and a tick bot to accept terms and conditions anyway, the problem is when I submit it, it says there is a error with my mail server. I will add my contact form code, and the contact_me.php found in the bin file. Hope someone can help.
`<?php
// check if fields passed are empty
if(empty($_POST['name']) ||
empty($_POST['phone']) ||
empty($_POST['email']) ||
empty($_POST['package'])
empty($_POST['message'])
empty($_POST['tandc']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
{
echo "No arguments Provided!";
return false;
}
// create email body and send it
$to = 'thomas@directgaming.tv'; // PUT YOUR EMAIL ADDRESS HERE
$email_subject = "Request For: $name"; // EDIT THE EMAIL SUBJECT LINE HERE
$email_body = "You have received a new message from your website's contact form.\n\n"."Here are the details:\n\nName: $name\n\nPhone: $phone\n\nEmail: $email_address\n\nMessage:\n$message\n\ntandc\n\nPackage: $package\n";
$headers = "From: thomas@directgaming.tv\n";
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
return true;
?>
<!DOCTYPE html>
Hello, I am not too familiar with code and stuff but I have a website and a contact from, I used a template from bootstrap, I have added a few custom feilds such as drop downs and a tick bot to accept terms and conditions anyway, the problem is when I submit it, it says there is a error with my mail server. I will add my contact form code, and the contact_me.php found in the bin file. Hope someone can help.
`<?php // check if fields passed are empty if(empty($_POST['name']) || empty($_POST['phone']) || empty($_POST['email']) || empty($_POST['package']) empty($_POST['message']) empty($_POST['tandc']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; }
$name = $_POST['name']; $phone = $_POST['phone']; $package = $_POST['package']; $message = $_POST['message']; $tandc = $_POST['tandc'];
// create email body and send it
<!DOCTYPE html>
```$to = 'thomas@directgaming.tv'; // PUT YOUR EMAIL ADDRESS HERE $email_subject = "Request For: $name"; // EDIT THE EMAIL SUBJECT LINE HERE $email_body = "You have received a new message from your website's contact form.\n\n"."Here are the details:\n\nName: $name\n\nPhone: $phone\n\nEmail: $email_address\n\nMessage:\n$message\n\ntandc\n\nPackage: $package\n"; $headers = "From: thomas@directgaming.tv\n"; $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); return true;
?>
Request
Problem?
Do you have a problem? Please tell us.
E: support@simplyhost.tech
H: Monday - Friday: 8:00AM - 7:00PM (GMT)
Saturday: 9:00AM - 8:00PM (GMT)
Sunday: Support is Closed
Request a Package
`
please see this thread:
https://github.com/y7kim/agency-jekyll-theme/issues/14