i have problem with loop.
i have code like this,
foreach ($j as $empas) {
date_default_timezone_set('Asia/Jakarta');
$nomor = Nomor($i, $total);
$proses = proses($total, $i) . "%";
$timeServer = date("G:i:s");
$toDay = date("d-M-Y");
for($p=0;$p<$total;$p++){
$user = $userlist[$p%count($userlist)] ;
echo "\e[37m [" . $timeServer . "] - {$nomor}/{$total} - [{$proses}] {$user} > {$empas} \e[0m ";;
if (isEmail($empas)) {
echo imakochan($empas, $letter, $host, $user, $pw, $port, $sendermail, $sendername, $subjek). "\n";
} else {
echo " This is not valid email ";
}
if ($i == $total) {
echo "\n";
echo " [0;34m ================================================================================== \n";
echo " [0;34m [+] Sending Proccess Completed on " . $timeServer . " [+]\n";
}
$i++;
}
}
so , my problem is i can't rotate smtp when the php mailer send email.
i want smtp rotate by email ,it should be rotate by email
like this
smtpuser1 > email1 ->sent!
smtpuser2 > email2 ->sent!
smtpuser1 > email3 ->sent!
smtpuser2 > email4 ->sent!
when i do like this, i've got problem :
[17:01:42] - 1/2 - [50%] smtpuser1 > [email protected] -> Sent!
[17:01:42] - 1/2 - [50%] smtpuser2 > [email protected] -> Sent!
==================================================================================
[+] Sending Proccess Completed on 17:01:42 [+]
[17:01:50] - 3/2 - [150%] smtpuser1 > [email protected] -> Sent!
[17:01:50] - 3/2 - [150%] smtpuser2 > [email protected] -> Sent!