Salve, ho un problema,
ho creato un sito il quale dopo una registrazione di un utente, manda una mail per avvisare della corretta registrazione però mi tornano indietro molte email come spam

ecco:
> Content analysis details: (6.3 points, 5.0 required)
>
> pts rule name description
> ---- ---------------------- --------------------------------------------------
> 1.5 SUBJ_ALL_CAPS Subject is all capitals
> 0.0 HTML_MESSAGE BODY: HTML included in message
> 1.0 BAYES_50 BODY: Bayes spam probability is 40 to 60%
> [score: 0.4958]
> 0.7 MIME_HTML_ONLY BODY: Message only has text/html MIME parts
> 0.4 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag
> 0.5 MISSING_MID Missing Message-Id: header
> 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS
> 1.4 MISSING_DATE Missing Date: header
> 0.0 TO_EQ_FM_HTML_ONLY To == From and HTML only
> 0.0 TO_NO_BRKTS_NORDNS_HTML TO_NO_BRKTS_NORDNS_HTML

a parte l'oggetto in maiuscolo non capisco cosa sbaglio nella creazione dell'email
vi incollo il pezzo di codice php che invia le mail
function invia($destinatario, $oggetto, $testo, $SourceAttach, $DestName) {


$from = MAILSERVER_FROM;
$to = $destinatario;
$subject = $oggetto;
$testo = str_replace("\'", "'", $testo);
$subject = str_replace("\'", "'", $subject);
$host = MAILSERVER_HOST;
$port = MAILSERVER_PORT;
$username = MAILSERVER_USER;
$password = MAILSERVER_PASSWORD;

$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject);
$mime = new Mail_Mime("\n");
$mime->setHtmlBody($testo);

$parametres = array('html_charset' => 'UTF-8',
'text_charset' => 'UTF-8',
'head_charset' => 'UTF-8',
'7bit_wrap' => 70);

// IMPORTANT: add pdf content as attachment
if($SourceAttach != null){
$mime->addAttachment($SourceAttach, 'application/pdf', $DestName, 0);
}

// build email message and save it in $body
$body = $mime->get($parametres);
$headers = $mime->headers($headers);
$mail = $smtp->send($to, $headers, $body);
}

Non riesco proprio a capire cosa sbaglio.