The documentation appears to leave out 2 keys in the $message array: 'params' and 'language'.
The following is an excerpt from the drupal_mail function, showing that these two variables are included in the array passed to hook_mail_alter.
// Bundle up the variables into a structured array for altering.
$message = array(
'id' => $module .'_'. $key,
'to' => $to,
'from' => isset($from) ? $from : $default_from,
'language' => $language,
'params' => $params,
'subject' => '',
'body' => array()
);
Comments
Comment #1
jhodgdonThe Drupal 7 doc for hook_mail_alter has these two components: http://api.drupal.org/api/function/hook_mail_alter/7
Drupal 6 version leaves them out, and sja1 is correct that they are in http://api.drupal.org/api/function/drupal_mail/6 and should be documented in hook_mail_alter().
Comment #2
jhodgdonComment #3
jhodgdonI fixed this for Drupal 6 (it's in the contrib repository). Just copied the relevant lines from Drupal 7 doc.
http://drupal.org/cvs?commit=272426