# Contact Form

The template comes with a simple PHP mail script which allows you to gather leads from your website.

Open the mail.php file from the root of the template with any text editor and change the $recepient variable to your own email address.

if ($_POST) {

  $recepient = 'art.krsk@gmail.com'; // your email
  $sitename  = 'Rubenz Website'; // your site name
  $subject   = "New contact from \"$sitename\""; // subject template

  $name  = trim($_POST['visitor_name']);
  $email = trim($_POST['visitor_email']);
  $msg   = trim($_POST['visitor_msg']);

  $message = "
  -------------------<br><br>
  Visitor name: $name <br>
  Visitor email: $email <br><br>
  $msg
  <br><br>-------------------
  ";

  mail($recepient, $subject, $message, "From: $name <$email>" . "\r\n" . "Reply-To: $email" . "\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . 'Content-type: text/html; charset="utf-8"');
}

Some other variables and text templates are also safe to customize.

WARNING

You need to have PHP enabled on your hosting with the mail() function allowed. If you are experiencing issues with the script, please contact your hosting provider for assistance and ask if your hosting supports PHP and if it's allowed to send emails from your website domain.