Sindbad~EG File Manager

Current Path : /home/ssan4778/public_html/06052021/
Upload File :
Current File : /home/ssan4778/public_html/06052021/mail.php

<?php

//Retrieving variables from form
$nome = $_POST['nome'];
$email = $_POST['email'];
$telefone = $_POST['telefone'];
$assunto = "".$_POST['assunto']." - Contato pelo site";
$mensagem = $_POST['mensagem'];

//Conditions
if(!($nome && $email && $telefone && $assunto && $mensagem))
{
	echo"<script>alert('Preencha todos os campos, por favor');</script>";
	echo"<script>history.back();</script>";
}
elseif(strlen($nome)<5)
{
	echo"<script>alert('Digite o seu nome corretamente, ele deve conter mais que 5 caracteres.');</script>";
	echo"<script>history.back();</script>";
}
elseif(strlen($email)<11)
{
	echo"<script>alert('Digite corretamente o seu email.');</script>";
	echo"<script>history.back();</script>";
}
elseif(strlen($telefone)<9)
{
	echo"<script>alert('Digite corretamente o seu telefone.');</script>";
	echo"<script>history.back();</script>";
}
elseif(strlen($assunto)<5)
{
	echo"<script>alert('Escolha ou digite um assunto.');</script>";
	echo"<script>history.back();</script>";
}
elseif(strlen($mensagem)<7)
{
	echo"<script>alert('Digite sua mensagem.');</script>";
	echo"<script>history.back();</script>";
}
else
{		
	//Receivers
	$to = "contato@sanhouse.com.br" ;
	
	//Mensagem
	$message = ' 
	<table width=711 border=0 cellspacing=4 cellpadding=0 >
		
		  <tr>
		<td width=650 scope=col><font face="verdana" size=2 color="#333333"><b><center>Formul�rio de contato enviado do site por '.$nome.'</center></b><br /><br /><b>Enviado por:</b> '.$nome.'</font></td>
		</tr>
		
		<tr>
		<td width=650 scope=col>&nbsp;</td>
		</tr>
		
		  <tr>
		<td width=650 scope=col><font face="verdana" size=2 color="#333333"><b>E-mail:</b> '.$email.'</font></td>
		</tr>
		
		<tr>
		<td width=650 scope=col>&nbsp;</td>
		</tr>
	
		<tr>
		<td width=650 scope=col><font face="verdana" size=2 color="#333333"><b>Tel:</b> '.$telefone.'</td>
		</tr>
		
		<tr>
		<td width=650 scope=col>&nbsp;</td>
		</tr>
		
		<tr>
		<td width=650 scope=col><font face="verdana" size=2 color="#333333"><b>Mensagem:</b> '.$mensagem.'</font></td>
		</tr>
		
		<tr>
		<td width=650 scope=col>&nbsp;</td>
		</tr>
		
		<tr>
		<td width=650 scope=col>&nbsp;</td>
		</tr>
		
		<tr>
		<td width=650 scope=col><font face="verdana" size=2 color="#333333"><u>Mensagem enviada pelo formul�rio do site San House</u></font></td>
		</tr>
		
	</table> 
	';
	
	//Headers
	$headers = "MIME-Version: 1.0\n"; 
	$headers .= "Content-type: text/html; charset=iso-8859-1\n"; 
	$headers .= "From: ".$email."\n"; 
	$headers .= "Return-Path: <contato@sanhouse.com.br>\n";
	
	//Sending message
	if(mail($to, $assunto, $message, $headers))
	{
		echo"<script>alert('Mensagem enviada! Em breve entraremos em contato.');</script>";
		echo"<script>history.back();</script>";
	}
	else
	{
		echo"<script>alert('Mensagem n�o enviada! Erro no servidor. Tente outro meio de contato ou volte novamente mais tarde.');</script>";
		echo"<script>history.back();</script>";
	}

}

?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists