Ya corregi el problema en parte, el fallo estaba en el traspaso de variables. Probando los códigos que me dijisteis me quedó algo así:
Código PHP:
include "config.php";
mysql_connect($server, $db_user, $db_pass) or die (mysql_error());
mysql_select_db($database) or die (mysql_error());
$result = mysql_query("select * from $table order by username asc") or die (mysql_error());
if ($result) {
echo "<font size=3 color=#FFFFFF>Tratando de enviar el mensaje...<br><br>";
while ($qry = mysql_fetch_array($result)){
$lista_mail[]=$qry['email']; // array que contiene todos los emails recuperados por tu query
echo $qry['email']."<br>";
}
}
require_once('class.phpmailer.php');
$mail = new PHPMailer(); // defaults to using php "mail()"
$body = file_get_contents('contents.html');
$body = eregi_replace("[\]",'',$body);
$mail->AddReplyTo("[email protected]","Storm of Sighs");
$mail->SetFrom('[email protected]', 'Storm of Sighs');
$mail->AddReplyTo("[email protected]","Storm of Sighs");
$address = implode(',',$lista_mail); // lista de emails separado por comas
$mail->AddAddress($address, "Storm of Sighs");
Y el error que me dice es 'You must provide at least one recipient email address. Mailer Error: You must provide at least one recipient email address.'