title: Why my emails keep going to spam with PHPMailer?
body: <p>I'm using SMTP authentication, i follow the rules so it doesn't gets flagged as spam, i already looked into cname.</p>
  <p>I'm hosting my webserver in Hostinger, but I also have some websites in Hostgator and the same occurs, i already asked for their support to activate everything so my email doesn't get flagged as spam, but nothing solves it.</p>
  <p>Here's the code from the PHPMailer php file:</p>
  <pre><code>&lt;?php
      use PHPMailer\PHPMailer\PHPMailer;
      use PHPMailer\PHPMailer\Exception;
  
      require '../PHPMailer/Exception.php';
      require '../PHPMailer/PHPMailer.php';
      require '../PHPMailer/SMTP.php';
  
      //Don't run this unless we're handling a form submission
      function SendActivateAccountEmail($email, $name, $lastName){
  
          //Instantiation and passing `true` enables exceptions
          $mail = new PHPMailer(true);
  
          try {
              //Server settings
              $mail-&gt;isSMTP();                                            //Send using SMTP
              $mail-&gt;CharSet = 'UTF-8';                                   //Accepts special characters
              $mail-&gt;Encoding = 'base64';                                 //Corrects possible problems of UTF-8 with default phpmailer encoding
              $mail-&gt;Host       = 'smtp.hostinger.com';                       //Set the SMTP server to send through
              $mail-&gt;SMTPAuth   = true;                                   //Enable SMTP authentication
              $mail-&gt;Username   = 'support@mywebsite.com';                 //SMTP username
              $mail-&gt;Password   = 'password';                            //SMTP password
              $mail-&gt;SMTPSecure = 'ssl';                                  //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
              $mail-&gt;Port       = 465;                                    //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
  
              //Recipients
              $mail-&gt;setFrom('support@mywebsite.com', 'Support - My Website');
              $mail-&gt;addAddress($email, $name.' '.$lastName);     //Add a recipient
              $mail-&gt;addReplyTo('support@mywebsite.com', 'Support - My Website');
  
              //Content
              $mail-&gt;isHTML(true);                                  //Set email format to HTML
              $mail-&gt;Subject = 'Activate account - My Website';
              $mail-&gt;Body    = '
              &lt;!DOCTYPE html&gt;
              &lt;html lang=&quot;en&quot;&gt;
              &lt;head&gt;
                  &lt;meta charset=&quot;UTF-8&quot;&gt;
                  &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
                  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
              &lt;/head&gt;
              &lt;body&gt;
                  &lt;p&gt;
                      Some text...
                  &lt;/p&gt;
              &lt;/body&gt;
              &lt;/html&gt;
              ';
  
              $mail-&gt;AltBody = &quot;Some text...&quot;;
  
              $mail-&gt;send();
              //echo 'Message has been sent';
          } catch (Exception $e) {
              //echo &quot;Message could not be sent. Mailer Error: {$mail-&gt;ErrorInfo}&quot;;
          }
      }
  ?&gt;
  </code></pre>
  <p>Ps: Maybe this could be related to my domains don't having enough credibility due to beeing new and stuff... Maybe emails servers (gmail, outlook...) don't trust my domains for some reason?</p>
  <p>I don't spam e-mails. These are e-mails for comfirming account when created, or some forms... But still all my websites e-mails gets flagged as spam.</p>