the variable $message['body'] is an array, not a string. Example code should read like this :

function hook_mail_alter(&$message) {
  if ($message['mail_id'] == 'my_message') {
    $message['body'][] = "\n\n--\nMail sent out from " . variable_get('sitename', t('Drupal'));
  }
}

Problem exists in Drupal 6 documentation as well.

CommentFileSizeAuthor
system.api_.patch469 bytesjersu

Comments

damien tournoud’s picture

Status: Active » Closed (duplicate)