echo "email send v1 \n<br>"; } elseif ($invited->getTotalEmailSent_() == 2) { //send email version2 echo "email send v2 \n<br>"; } elseif ($invited->getTotalEmailSent_() == 3) { //send email version3 echo "email send v3 \n<br>"; } else { echo "Error\n<br>"; } echo "{$counter}.) \n"; $alert->alert("Location Info ", $invitedLocation->setInvitedLocationInfo($locationId, $database), " set qid = {$qId} <br>\n"); //set invited info $alert->alert("invited ", $invited->setInvitedInfoById($iId, $database), " set iId = {$iId} <br>\n"); //set time zone $alert->alert("Time ", Time::setTimeZoneDateTime($invited->getTimeZone()), " set timezone = " . $invited->getTimeZone() . " <br>\n"); //if the total sent email is greater than 3 then it should invited email should not received an invited if ($invited->getTotalEmailSent_() <= 2) { //condition combine queue date and specific location time if ($invited->getTotalEmailSent_() == 0) { $dateTime = $date1 . ' ' . $invitedLocation->getLocationTime1(); echo "send new email v1 set date <br>\n"; } elseif ($invited->getTotalEmailSent_() == 1) { $dateTime = $date2 . ' ' . $invitedLocation->getLocationTime2(); echo "send new email v2 set date <br>\n"; } elseif ($invited->getTotalEmailSent_() == 2) { $dateTime = $date3 . ' ' . $invitedLocation->getLocationTime3(); echo "send new email v3 set date <br>\n"; } else { echo "\n else no send new email total sent is greater than 2 and value i" . $invited->getTotalEmailSent_(); }