PHPMailer is going to spam

0

I'm using phpmailer to send email, but it's falling into spam in hotmail and gmail. I tested connecting smtp in another domain and went to the inbox right away. Are there any settings I can make to prevent this? The domain is new, so it's not in blacklist, or anything like that.

<?php

require_once("phpmailer/class.phpmailer.php");
$mail = new PHPMailer(true);
$mail->IsSMTP(); // Define que a mensagem será SMTP

try {
     $mail->Host = 'mail.meudominio.com';
     $mail->SMTPAuth   = true;
     $mail->SMTPSecure = "ssl";
     $mail->Port       = 465;
     $mail->Username = '[email protected]';
     $mail->Password = 'senha';

     //Define o remetente
     // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=    
     $mail->SetFrom('[email protected]', 'Nome');
     $mail->AddReplyTo('[email protected]', 'Nome');
     $mail->Subject = 'Meu Assunto';//Assunto do e-mail

     //Define os destinatário(s)
     //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     $mail->AddAddress('[email protected]', 'Teste');

     //Define o corpo do email
     $mail->MsgHTML('corpo do email'); 
     $mail->Send();
     echo "Mensagem enviada com sucesso</p>\n";

    //caso apresente algum erro é apresentado abaixo com essa exceção.
    }catch (phpmailerException $e) {
      echo $e->errorMessage(); //Mensagem de erro costumizada do PHPMailer
}
?>
    
asked by anonymous 20.06.2018 / 13:49

0 answers