authorcontact_mail() $message['body'] should be an array
budda - May 6, 2009 - 11:52
| Project: | Author Contact |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
To allow other modules to hook_mail_alter() your modules email the $message['body'] that is returned from authorcontact_mail() should be an array rather than a string.
$message['body'][] = t('You have recieved an enquiry through @sitename on the page @nodetitle at @refererThis allows modules such as mollom to tack on a footer to your outbound email.
The documentation on http://api.drupal.org/api/function/drupal_mail/6 is also incorrect I feel.
'recieved' is also incorrectly spelt, it should be 'received'.

#1
Documentation on api.drupal.org has been updated accordingly now too - #455172: drupal_mail() example encourages $message['body'] to be set as a string rather than array
#2
Thanks for drawing my attention to this budda.
I've changed the body to an array in the d6-dev version
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.