Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2009 at 18:54 UTC
Updated:
27 Jul 2009 at 19:08 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| system.api_.patch | 469 bytes | jersu |
Comments
Comment #1
damien tournoud commentedSee #524790: Incorrect sample code for hook_mail_alter.