I don't know if this is related to your problem (I haven't worked with mail() in a year or so), but your mail call:
mail("$a_eboxes[email_address]", $subject, $msg_body, $mail1_headers, "-q");
You want:
mail("{$a_eboxes[email_address]}", $subject, $msg_body, $mail1_headers, "-q");
PHP doesn't treat the [ or ] as part of the variable unless you force it to:
$array = array('apples','oranges','grapes','pears');
$index = 2;
print "mystring1$array[$index]mystring2"; // mystring1Array[2]mystring2
print "mystring1{$array[$index]}mystring2"; // mystring1grapesmystring2
print "mystring1".$array[$index]."mystring2"; // mystring1grapesmystring2
Also, don't rely on PHP to properly interpret $array[mystring] as $array['mystring']; they don't always come out to the same thing.
HTH,
Nick