I am trying to write a basic PHP Mail Function and it doesn't work when I try using Associated/Multi-Dimensional Array stored data "$emailer['pk']['cr']" for the Message value. No error message is sent/logged and the email fails to send. Switching the Message to a standard variable allows the email to process successfully.
How can i use the Associated Array data with the Mail function, is this not allowed or am i missing something?
/* I've Removed Header Data for Safety */
// Fails
$emailer['pk']['cr'] = "=====";
$emailer['pk']['cr'] .= "The message";
$emailer['pk']['cr'] .= "=====";
mail($to, $subject, $emailer['pk']['cr'], $headers);
// Works
$message = "An example message";
mail($to, $subject, $message, $headers);