Senden von Massen-E-Mails mit phpmailer

Ich bin neu in Phpmailer und ich benutze es zum senden einer Massen-E-Mails sind über tausend Menschen von einer noreply-Konto. Der code funktioniert problemlos, wenn ich die E-Mail senden, um eine oder zwei Personen, aber wenn ich senden Sie es an alle (einschließlich mir selbst) geht es um spam. Ein weiteres problem ist in den details der E-Mail zeigt die E-Mail-ids von den Menschen, von dem es gesendet wurde, die ich nicht wollen, es zu tun.
Der code ist wie folgt:

//date_default_timezone_set('America/Toronto');

require_once('../class.phpmailer.php');
//include("class.smtp.php"); //optional, gets called from within class.phpmailer.php  if not already loaded

$mail = new PHPMailer();
$mail->IsSMTP(); //telling the class to use SMTP
$mail->Host          = "smtp1.site.com;smtp2.site.com";
$mail->SMTPAuth      = true;//enable SMTP authentication
$mail->SMTPKeepAlive = true;//SMTP connection will not close after each email sent
$mail->Host          = "mail.yourdomain.com"; //sets the SMTP server
$mail->Port          = 26;                    //set the SMTP port for the server
$mail->Username      = "yourname@yourdomain"; //SMTP account username
$mail->Password      = "yourpassword";        //SMTP account password
$mail->SetFrom('[email protected]', 'List manager');
$mail->AddReplyTo('[email protected]', 'List manager');
$mail->Subject       = 'Newsletter';
$ids = mysql_query($select, $connection) or die(mysql_error());
while ($row = mysql_fetch_row($ids)) {
$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!";
$mail->MsgHTML($body);
$mail->AddAddress($row[0]);
$mail->Send();//Sends the email
}
InformationsquelleAutor user992654 | 2011-10-13
Schreibe einen Kommentar