HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/incastiglionfiorentino/wp-content/themes/amplify/sendmail.php
<?php
	//validate fields
$errors = '';

//has the form's submit button been pressed?
if( !empty( $_POST['myformsubmit'] ) )
{
	// HAS THE SPAM TRAP FIELD BEEN FILLED IN?
	if( !empty( $_POST['favouriteColour'] ) )
	{
		exit;
	}

	

if(empty($_POST['name'])  || 
   empty($_POST['email']) || 
   empty($_POST['message']) ||
	empty($_POST['myemail']))
{
    $errors .= "\n Error: all fields are required";
}

$myemail = $_POST['myemail'];

/*$myemail = 'press@incastiglionfiorentino.com';*/ //<-----Put Your email address here.

$name = $_POST['name']; 
$email_address = $_POST['email']; 
$message = $_POST['message']; 

if (!eregi(
"^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", 
$email_address))
{
    $errors .= "\n Error: Invalid email address";
}

	//send email

if( empty($errors))
{
   $to = $myemail; 
   $email_subject = "Richiesta Informazioni InCastiglionFiorentino.com da: $name";
   $email_body = "Hai ricevuto un messaggio dal sito InCastiglionFiorentino.com".
   " Di seguito i dettagli del messaggio:\n Nome: $name \n ".
   "Email: $email_address\n Messaggio: \n $message"; 
   
   $headers = "From: $email_address"; 
   
   mail($to,$email_subject,$email_body,$headers);
   //redirect to the 'thank you' page
							
   
}
else {



   }

}

?>