Download & Extend

authorcontact_mail() $message['body'] should be an array

Project:Author Contact
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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 @referer

This 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'.

Comments

#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

Status:active» fixed

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.