function pm_email_notify_mail in Privatemsg 6
Same name and namespace in other branches
- 6.2 pm_email_notify/pm_email_notify.module \pm_email_notify_mail()
- 7.2 pm_email_notify/pm_email_notify.module \pm_email_notify_mail()
- 7 pm_email_notify/pm_email_notify.module \pm_email_notify_mail()
Implements hook_mail().
File
- pm_email_notify/
pm_email_notify.module, line 104 - Notifies users about new Private Messages via Email.
Code
function pm_email_notify_mail($key, &$message, $params) {
$language = $message['language'];
$variables = user_mail_tokens($params['recipient'], $language);
$variables = array_merge($variables, _pm_email_notify_token($params['recipient'], $params['message'], $language));
switch ($key) {
case 'notice':
$message['subject'] = t(variable_get('pm_email_notify_subject', 'New private message at !site.'), $variables, $language->language);
$message['body'] = t(variable_get('pm_email_notify_body', _pm_email_notify_default_body()), $variables, $language->language);
break;
}
}