Sending to list generated from MySQLi recordset
Does the current Universal Email work with MySQLi ?
Need to know if I need hack the behaviour or fall back to a non mysqli recordset or as prior suggested, loop the behaviour???
Looks like the value is properly setting in the behaviour but would appreciate some clarifications on if this will work. Tests show only one of the target emails showing up but not sure if my mail server is blocking or if the Behaviour is not completing the loop of recipeients...?
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST")) {
//WA Universal Email object="mail"
@session_write_close();
@set_time_limit(0);
$EmailRef = "waue_email-blast-simple_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "email-blast-simple.php?sent=1";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "".($emailTargets->getColumnVal("eMail")) ."";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
What about debugging? Anything built in or any help on this level also?