Ciao a tutti,
ho un problema con il filtro della posta indesiderata di Outlook. Utilizzando uno script PHP per l'invio della newsletter del sito che gestisco, ho notato che Outlook lo classifica come spam (non sempre). Chiaramente dipenderà dal livello antispam che l'utente seleziona, ma vorrei sapere se ci esistono degli accorgimenti (e quali) per evitare che la mia newsletter finisca a volte in quella dannatissimacartella, che nessuno legge.
Vi allego lo script che io utilizzo per l'invio.
Grazie davvero!!
Alessandro
<?php
session_start();
include '../connect.php';
ini_set("include_path", "./phpmailer/");
require("class.phpmailer.php");
//set_time_limit(1000);
if (!$_SESSION["utente"])
header("Location: login.php");
$testo = $_POST["testo"];
$oggetto = $_POST["oggetto"];
$sel_mail = "select mail from newsletter";
$selmail = mysql_query($sel_mail);
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "*********"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "*************"; // SMTP username
$mail->Password = "****"; // SMTP password
$mail->From = "*************";
$mail->FromName = "*****************";
//$mail->AddAddress("");
$indirizzi = array('*********************');
while($tmp_mail = mysql_fetch_assoc($selmail)) {;
foreach ($tmp_mail as $key) {
$mail->AddBCC("" . $key . "");
}
}
//$mail->AddBCC("********"); // optional name
//$mail->AddReplyTo("**************");
//$mail->WordWrap = 50; // set word wrap
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
$mail->IsHTML(true); // send as HTML
$mail->Subject = "" . stripslashes($oggetto) ."";
$mail->Body = "" . stripslashes($testo) . "";
//$mail->AltBody = "This is the text-only body";
if(!$mail->Send())
{
echo "Message was not sent
";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
echo "
";
echo "<a href=\"admin.php\">" . "Torna al menu" . "</a>";
?>