2
Good morning,
I have the following code to send an e-mail via Phpmailer.
<?php
$GetPost = filter_input_array(INPUT_POST,FILTER_DEFAULT);
$Erro = true;
$Tipo = $GetPost['tipo'];
$Nome = $GetPost['nome'];
$Email = $GetPost['email'];
$Telefone = $GetPost['telefone'];
$Cargo = $GetPost['cargo'];
$Curriculo = $_FILES['curriculo'];
$Mensagem = $GetPost['mensagem'];
include_once 'PHPMailer/class.smtp.php';
include_once 'PHPMailer/class.phpmailer.php';
$Mailer = new PHPMailer;
$Mailer->CharSet = "utf8";
$Mailer->SMTPDebug = 3;
$Mailer->FromName = "Jogo Digital";
$Mailer->From = "[email protected]";
$Mailer->AddAddress("[email protected]");
$Mailer->IsHTML(true);
$Mailer->Subject = "Novo currículo \"Trabalhe Conosco\" - {$Nome}";
$Mailer->AddAttachment($Curriculo['tmp_name'], $Curriculo['name']);
$Mailer->Body = "
Novo currículo enviado por {$Nome}<br />
Tipo: {$Tipo}<br /><br>
<b>Dados:</b><br /><br>
Email: {$Email}<br>
Telefone: {$Telefone}<br>
Cargo: {$Cargo}<br>
Mensagem: {$Mensagem}<br>
Curriculo: {$Curriculo}
";
if(!$Mailer->Send()){
echo "<script>alert('Não foi possível enviar, tente novamente!');window.history.back();</script>";
} else {
echo "<script>alert('Curriculo enviado com sucesso!');window.history.back();</script>";
}
What should I enter in this code to send by smtp? Because the way it is now, all emails are falling into SPAM.
Thank you!
Could you talk more about your answer? I believe it would bring more quality to her and the site in general.
– UzumakiArtanis