Sto provando ad usare PHPMailer per implementare la mia mailing list...ottengo però questo errore:
Mailer Error: Language string failed to load: recipients_failed
Il codice per l'invio è il seguente:
Qualche idea?Codice PHP:/* Send an email to the subscribers */
function send_email($title, $content) {
$mail = new PHPMailer(); // Create a PHPMailer object
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = SMTP_HOST; // specify main and backup server
$mail->Port = 587;
$mail->SMTPAuth = SMTP_AUTH; // turn on SMTP authentication
$mail->Username = SMTP_USERNAME; // SMTP username
$mail->Password = SMTP_PASSWORD; // SMTP password
$mail->From = MAIL_FROM; // Sender
//$mail->FromName = MAIL_FROM_NAME; // Sender name
/* Get all subscribers */
$subscribers = db_get_all_subscriber();
for($cnt = 0; $cnt < count($subscribers); $cnt++)
$mail->AddAddress($subscribers[$cnt]['email'], $subscribers[$cnt]['name']);
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $title;
$mail->Body = '<h1>'.$title.'</h1>'.$content;
if(!$mail->Send()) {
echo "Message could not be sent.";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
}
Grazie a tutti
![]()

Rispondi quotando
Non vorrei approfittare, ma visto che ci sono, posso chiederti se c'è un modo per "nascondere" la lista di destinarari della mailing list all'atto dell'invio della mail? (Per ovvie questioni di privacy...)
