$uyeler = $DB->ALL("uyeler","*","where durum='1' $where order by id desc",0);
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1; // hata ayiklama: 1 = hata ve mesaj, 2 = sadece mesaj
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'tls'; // Güvenli baglanti icin ssl normal baglanti icin tls
$mail->Host = "mail.xxxx.com"; // Mail sunucusuna ismi
$mail->Port = 587; // Gucenli baglanti icin 465 Normal baglanti icin 587
$mail->IsHTML(true);
$mail->SetLanguage("tr", "phpmailer/language");
$mail->CharSet ="utf-8";
$mail->Username = "no-reply@xxxx.com"; // Mail adresimizin kullanicı adi
$mail->Password = "!U+T5Q"; // Mail adresimizin sifresi
$mail->SetFrom("no-reply@xxxx.com", "xxxx.com"); // Mail attigimizda gorulecek ismimiz
foreach($uyeler["data"] as $uye)
{
$mail->AddAddress($uye["email"]);
}
$mail->Subject = "xxxx.com - ".$_POST["konu"]; // Konu basligi
$mail->Body = $_POST["mail"]; // Mailin icerigi
$mail->Send();fonksiyon oluşturmana gerek yok

addadressi dizi içinde göstermen yeterli.