format(). */ function reroute_email_test_mail_alter(&$message) { // Only alter the email for the key test_reroute_email. if ($message['key'] != 'test_reroute_email') { return; } // Prevent Warning from drupal_mail because body is not an array. if (is_string($message['body'])) { // Record to be checked in test in the log entries. watchdog('reroute_email_test', 'A String was detected in the body:
!body
', array('!body' => $message['body']), WATCHDOG_NOTICE); // Convert body to an Array. $message['body'] = array($message['body']); } }