title: PHPMailer mails goes straight to Spam
body: <p><strong>The situation:</strong></p>
  
  <p>Writing a function in php with PHPMailer for sending account activation mails for a website.</p>
  
  <p><strong>The problem:</strong></p>
  
  <p>All my mails goes straight into the spam folder instead of inbox. Only gmail-adresses recieve my mails correctly. </p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>&lt;?php 
   /********************************************************************************************************************************
  File:   sendmail.php
  Author: Burtscher Florian
  Date:   02.02.2017
  Description:
      This file contains the sendmail functions for mailing noreply messages to EmailClients.
  ***************************************************************************************************************************/
  
  require 'PHPMailer-master/PHPMailerAutoload.php';
  
  
  $result = sendmail('asdf','asdf','asdf','asdf');
  
  if(!$result){
     echo $result;
  }
  
  
  function sendmail($to,$subject,$message,$name){
    $mail = new PHPMailer;
  
    //$mail-&gt;SMTPDebug = 3;
  
    $mail-&gt;isSMTP();    // Set mailer to use SMTP
    $mail-&gt;Host = 'smtp.world4you.com';                //'smtp1.example.com;smtp2.example.com';      // Specifay main and backup SMTP server 
    $mail-&gt;SMTPAuth = true;                                                                    // Enable SMTP authentication
    $mail-&gt;Username = 'activation@scritex.com';
    $mail-&gt;Password = '*************';
    $mail-&gt;SMTPSecure = 'tls';
    $mail-&gt;Port = 587;                                                                   // TCP port to connect
  
    $mail-&gt;setFrom('activation@scritex.com', 'Activation');
    $mail-&gt;addAddress('mytestmail1111@dkimvalidator.com', 'Florian Burtscher');         // Add a recipient
    $mail-&gt;addReplyTo('activation@scritex.com', 'Office');                              // Add Reply To
  
    $mail-&gt;isHTML(true);
  
    $mail-&gt;Subject = 'Here is a Subject';
    $mail-&gt;Body = 'This is the HTML message body &lt;b&gt;in bold!&lt;/b&gt;';
    $mail-&gt;AltBody = 'This is the body in plain text for non-HTML mail clients';
  
    $mail-&gt;DKIM_domain = 'scritex.com';
    $mail-&gt;DKIM_private = '.htkeyprivate';
    $mail-&gt;DKIM_selector = 'dkim11';
    $mail-&gt;DKIM_passphrase = '1486107933';
  
    if(!$mail-&gt;send()){
      return $mail-&gt;ErrorInfo;
    }else{
      return true;
    }
  }
  ?&gt;
  </code></pre>
  
  <p>Result:</p>
  
  <p><a href="https://i.stack.imgur.com/GO5UN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GO5UN.jpg" alt="Find result here"></a></p>
  
  <p>I don´t have any idea what to do.
  Anyone who knows this problem?</p>
  
  <p>All my mails goes at hotmail, outlook, yahoo, gmx, aon, msn to <strong>spam</strong>!</p>