PHP HTML email ends up in junk folder
<p>I'm at a complete loss right now.</p>

<p>I did plenty of research regarding this issue.
Some background: I'm sending a HTML email through PHP using PHPMailer. The problem is, it always ends up in the junk folder.</p>

<pre><code>$message = "&lt;html&gt;&lt;u&gt;Hello there&lt;/u&gt;&lt;/html&gt;";
date_default_timezone_set('Etc/UTC');
$mail = new PHPMailer();

 //even tried setting up SMTP server 
$mail-&gt;IsSMTP();
$mail-&gt;Host = "smtp.gmail.com";
$mail-&gt;SMTPAuth = true;
$mail-&gt;Username = "myGmailEmail@gmail.com";
$mail-&gt;Password = "my gmail password";
$mail-&gt;SMTPDebug = 2;
$mail-&gt;Port = 587;
$mail-&gt;SMTPSecure = 'tls';

$mail-&gt;setFrom('noreply@promisingwebsite.com', 'No-reply');
$mail-&gt;addReplyTo('noreply@promisingwebsite.com', 'No-reply');
$mail-&gt;AddAddress($to);
$mail-&gt;IsHTML(true);  
$mail-&gt;Subject  =  $subject;
$mail-&gt;MsgHTML($message);
if($mail-&gt;send()) resp(true,$code);
else resp(false,"error (".$mail-&gt;ErrorInfo.")");
</code></pre>

<p>When I do not use SMTP, it sends the email which ends up in junk folder. When I DO use it, I cannot authenticate:</p>

<pre><code>    2016-11-26 12:44:16 CLIENT -&gt; SERVER: EHLO 185.80.130.141
2016-11-26 12:44:16 CLIENT -&gt; SERVER: STARTTLS
2016-11-26 12:44:16 CLIENT -&gt; SERVER: EHLO 185.80.130.141
2016-11-26 12:44:16 CLIENT -&gt; SERVER: AUTH LOGIN
2016-11-26 12:44:16 CLIENT -&gt; SERVER: bmVkdWthczE3QGdtYWlsLmNvbQ==
2016-11-26 12:44:17 CLIENT -&gt; SERVER: bmVkdWxpdWthczEyMw==
2016-11-26 12:44:17 SMTP ERROR: Password command failed: 534-5.7.14 &lt;https://accounts.google.com/signin/continue?sarp=1&amp;scc=1&amp;plt=AKgnsbtT
                                      534-5.7.14 KhjtVSQhqL8MciQEtofR0fc36pPSF1zUxFnNZCay9DTcpxzjY0-elaKn8oWgt_-7bXpCSU
                                      534-5.7.14 L0sarBbOFwjA4l3lN_VmEDi1Pej1C4gHpfDiFnpC87Md82FK_qZe2B6J1olxCWnmQUQlWE
                                      534-5.7.14 eIwqtsXjE3xia_Y-lJnGZu7uQeQ7L_4QYj452Xxllf6GjA9Pz-cJsanxzXl7NTqRKEhcGM
                                      534-5.7.14 hTxqiKtVHXjFtkWZ_fGs5O960iNwk&gt; Please log in via your web browser and
                                      534-5.7.14 then try again.
                                      534-5.7.14  Learn more at
                                      534 5.7.14  https://support.google.com/mail/answer/78754 e102sm10342631lfi.25 - gsmtp
2016-11-26 12:44:17 SMTP Error: Could not authenticate.
2016-11-26 12:44:17 CLIENT -&gt; SERVER: QUIT
2016-11-26 12:44:17 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
</code></pre>

<p>I have no idea what to do. I ran spamcheck tests but they return somewhat a negative result (email is not classified as spam). Thanks for your help.</p>