function classified_notifications_mail in Classified Ads 7.3
Same name and namespace in other branches
- 6.3 modules/classified_notifications/classified_notifications.module \classified_notifications_mail()
Implements hook_mail().
@TODO support multiple languages, based on user language, not site language.
1 call to classified_notifications_mail()
- ClassifiedTestNotificationsTest::test1491880 in tests/
classified_test_notifications.test - Issue 1491880.
File
- modules/
classified_notifications/ classified_notifications.module, line 147 - Optional notification features for classified module.
Code
function classified_notifications_mail($key, &$message, $params) {
if (in_array($key, array(
'half-life',
'pre-expire',
'expire',
'pre-purge',
'purge',
))) {
$data = array(
'subject' => token_replace(_classified_get('notifications-' . $key . '-subject'), array(
'user' => $params['account'],
)),
'body' => array(
token_replace(_classified_get('notifications-' . $key . '-body'), array(
'user' => $params['account'],
)),
),
);
$message = array_merge($message, $data);
}
}