I'm having an issue with my website
http://datamatte.com.br/contato-e-suporte.html
The contact form is not working properly, I want to use Google Recaptcha as well.
The fisrt problem, I can press submit without the bot validation
I filled the $recaptcha secret
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = 'code-given-by-google'; // Your reCaptcha Secretand uncomented the folowing line of code on sendemail.php
// Uncomment the following Lines of Code if you want to Force reCaptcha Validation
if( !isset( $_POST['g-recaptcha-response'] ) ) {
echo '{ "alert": "error", "message": "Preencha a verificação de segurança e tente novamente" }';
die;
}
and the Google Recaptcha code are present on my HTML
The second problem is the message itself
I want to use SMTP, i filled the codes with my SMTP info and when I press "send" or in this case "enviar" in portuguese, the 'wheel' keep spining and the message is not sent nor any kind of error/success message.
I placed my smtp information on the sendemail.php
// If you intend you use SMTP, add your SMTP Code after this Line
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtpserver;'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'emailinformatiion'; // SMTP username
$mail->Password = 'password; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect toand class.phpmailer.php
/**
* Which method to use to send mail.
* Options: "mail", "sendmail", or "smtp".
* @var string
*/
public $Mailer = 'smtp';also
/**
* SMTP hosts.
* Either a single hostname or multiple semicolon-delimited hostnames.
* You can also specify a different port
* for each host by using this format: [hostname:port]
* (e.g. "smtp1.example.com:25;smtp2.example.com").
* You can also specify encryption type, for example:
* (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465").
* Hosts will be tried in order.
* @var string
*/
public $Host = 'smtp.datamatte.com.br:587'; /**
* The default SMTP server port.
* @var integer
* @TODO Why is this needed when the SMTP class takes care of it?
*/
public $Port = 587; /**
* What kind of encryption to use on the SMTP connection.
* Options: '', 'ssl' or 'tls'
* @var string
*/
public $SMTPSecure = 'tls'; /**
* SMTP username.
* @var string
*/
public $Username = 'email';
/**
* SMTP password.
* @var string
*/
public $Password = 'password';Maybe I messed up with something trying to make it work
