title: PhpMailer gets sent to spam in gmail and hotmail
body: <p>I am using PHPMailer - <a href="https://github.com/PHPMailer/PHPMailer" rel="nofollow noreferrer">https://github.com/PHPMailer/PHPMailer</a> to send an email with attachment. The mails gets sent to gmail/hotmail but they get send to &quot;Junk&quot;, how do I avoid this? What could be the trustable domain from which I can easily send to User's inbox?</p>
  <pre><code>&lt;?php
  
  ini_set('display_errors', 1);
  ini_set('display_startup_errors', 1);
  error_reporting(E_ALL);
  
  require 'vendor/autoload.php';
  
  require_once &quot;./vendor/phpmailer/phpmailer/src/PHPMailer.php&quot;;
  require_once &quot;./vendor/phpmailer/phpmailer/src/Exception.php&quot;;
  require_once &quot;./vendor/phpmailer/phpmailer/src/POP3.php&quot;;
  require_once &quot;./vendor/phpmailer/phpmailer/src/SMTP.php&quot;;
  
  use PHPMailer\PHPMailer\PHPMailer;
  use PHPMailer\PHPMailer\Exception;
  
  $email = new PHPMailer();
  $email-&gt;From      = 'Steven123@gmail.com';
  $email-&gt;FromName  = 'Steven';
  $email-&gt;Subject   = 'PDF attachment';
  $email-&gt;Body      = 'Hi';
  $email-&gt;AddAddress( 'NAME_OF_THE_USER@gmail.com' );
  $email-&gt;AddAttachment( &quot;./PDF.pdf&quot; , &quot;PDF.pdf&quot;, 'base64', 'application/octet-stream' );
  $email-&gt;Send();
  
  ?&gt;
  </code></pre>