PHP mailler birden fazla adres [yinelenen]

0 Cevap php

Possible Duplicate:
PHPMailer AddAddress()

İşte benim kodudur.

require('class.phpmailer.php');
$mail = new PHPMailer();

$email = 'email1@test.com, email2@test.com, email3@test.com';

    $sendmail = "$email";

    $mail->AddAddress($sendmail,"Subject");
    $mail->Subject = "Subject"; 
    $mail->Body    = $content;      

    if(!$mail->Send()) { # sending mail failed
        $msg="Unknown Error has Occured. Please try again Later.";
    }
    else {
        $msg="Your Message has been sent. We'll keep in touch with you soon.";
    }   
}

The Problem
if $email value is only 1. It will send. But multiple don't send. What should I do for this. I know that in mail function you have to separate multiple emails by comma. But not working in phpmailer.

0 Cevap