Is there a reason you're using a multidimensional array instead of just an associative? You're not iterating over any indexes because there aren't any present within the aggregated array format. The correct format should be :
Multidimension :
$mailMessage = array(
0 => array(
'mailNumber' => $mailCount,
'mailID' => $mailID,
'mailDate' => $mailDate,
'mailSender' => $mailSender,
'mailSenderName' => null,
'mailMsg' => null
)
);
Associative :
$mailMessage = array(
'mailNumber' => $mailCount,
'mailID' => $mailID,
'mailDate' => $mailDate,
'mailSender' => $mailSender,
'mailSenderName' => null,
'mailMsg' => null
);