Well, it's the following, I've created a form to send a quote from my client's client to my client using the site, but he does not click the "send" button and nothing happens and I'm not understanding why. I'll leave the HTML and PHP here in the description, there goes:
HTML:
<form name="orcamento" action="mail.php">
<div id="form-main">
<div id="form-div">
<form class="form" id="form1" method="POST" action="mail.php">
<p class="name">
<input name="name" type="text" class="validate[required,custom[onlyLetter],length[0,100]] feedback-input" placeholder="Nome" id="name" />
</p>
<p class="email">
<input name="email" type="text" class="validate[required,custom[email]] feedback-input" id="email" placeholder="Email" />
</p>
<p class="phone">
<input name="tel" type="text" class="validate[required,custom[email]] feedback-input" id="phone" placeholder="Telefone (Com DDD)" />
</p>
<p class="text">
<textarea name="text" class="validate[required,length[6,300]] feedback-input" id="comment" placeholder="Produtos"></textarea>
</p>
<div class="submit">
<button class="g-recaptcha" data-sitekey="6LdIgR4UAAAAALrbj6sHWoRU6v9zZgDXp71MXQiX" data-callback='onSubmit' name="enviar" type="submit" id="button-blue" formmethod="POST"> ENVIAR </button>
<div class="ease"></div>
<div class="g-recaptcha"
data-sitekey="6LdIgR4UAAAAALrbj6sHWoRU6v9zZgDXp71MXQiX"
data-callback="onSubmit"
data-size="invisible">
</div>
</div>
</form>
</div>
</form>
PHP:
<?php
if($_POST['name'] & $_POST['text'] & $_POST['tel'] != ''){
include "classes/class.phpmailer.php";
$GetPost = filter_input_array(INPUT_POST,FILTER_DEFAULT);
$mensagem = "<html><head><center><img src=\"image/logo-grande.png\"></center></head><body style=\"background-color:#FFF;font-family:Segoe UI;font-site:14px;color:#000;\">
<br /><br />
<b>Contato Site ".Config::tituloSite()."</b>
<br /><br />
<hr style=\"width:100%;border:1px solid #3399CC\" /><br />
<b>Nome:</b> ".$_POST['name']."<br /><br />
<b>E-mail:</b> ".$_POST['email']."<br /><br />
<b>Telefone:</b> ".$_POST['tel']."<br /><br />
<b>Mensagem:</b> ".nl2br($_POST['text'])."<br /><br />
<hr style=\"width:100%;border:1px solid #3399CC\" />
</body></html>";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Charset = "UTF-8";
$mail->SMTPSecure = 'ssl';
$mail->Host = 'mail.madeireirapadroeira.com.br'; // Endereço do servidor SMTP (Autenticação, utilize o host smtp.seudomínio.com.br)
$mail->SMTPAuth = true; // Usar autenticação SMTP (obrigatório para smtp.seudomínio.com.br)
$mail->Port = 587; // Usar 587 porta SMTP
$mail->Username = '[email protected]'; // Usuário do servidor SMTP (endereço de email)
$mail->Password = 'SENHA'; // Senha do servidor SMTP (senha do email usado)
//Define o remetente
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$mail->From = '[email protected]';
$mail->FromName = "ORÇAMENTO-SITE";
//Define os destinatário(s)
$mail->AddAddress('[email protected]');
$mail->IsHTML(true);
$mail->Subject = "Contato pelo site - {$_POST['name']}".date("H:i")." - ".date("d/m/Y");
$mail->Body = $mensagem;
if($mail->Send()){
echo 'E-mail enviado com sucesso!';
}
else{
echo 'Houve algum erro no envio. Tente novamente!'; .$mail->ErrorInfo;
}
}?>