0
即時通訊循環產生一封電子郵件,我希望它發送每個獨特的項目給一個獨特的人。
我發現,當我使用$ mail-> AddAddress時,下次它循環,它只是添加地址,包括前面循環中的所有收件人,並將它們全部發送出去。
如何重置地址變量?
loop(xtimes){
[generate customer $message]
$mail->Host = "smut.blabla.com";
$mail->port = 25;
$mail->AddReplyTo('[email protected]', 'test name');
$mail->AddAddress($currentEmployeeEmail);
$mail->SetFrom('[email protected]', 'test name');
$mail->Subject = "Your Daily Report, for $currentEmployee - $reportDate";
$mail->MsgHTML($message);
$mail->AddAttachment('logo_white.png');
$mail->Send();
}
是否有與SetAddress相同的內容?