function ed_classified_mail in Classified Ads 6.2
Same name and namespace in other branches
- 5.2 ed_classified.module \ed_classified_mail()
- 5 ed_classified.module \ed_classified_mail()
- 7.2 ed_classified.module \ed_classified_mail()
Implements hook_mail() which is invoked by drupal_mail().
Only present in Drupal 6 and 7.
1 call to ed_classified_mail()
- _ed_classified_send_user_notification_email in ./
ed_classified_notifications.inc - Send an email notification to the specified user
File
- ./
ed_classified.module, line 1085 - Simple text-based classified ads module.
Code
function ed_classified_mail($key, &$message, $params) {
$language = $message['language'];
$variables = array_merge(user_mail_tokens($params['account'], $language), $params['context']);
switch ($key) {
case 'expired':
$message['subject'] = t(EDI_CLASSIFIED_VAR_DEF_EXP_EMAIL_SUBJ, $variables, $language->language);
$message['body'][] = t(EDI_CLASSIFIED_VAR_DEF_EXP_EMAIL_BODY, $variables, $language->language);
break;
case 'expiring':
$message['subject'] = t(EDI_CLASSIFIED_VAR_DEF_EMAIL_SUBJ, $variables, $language->language);
$message['body'][] = t(EDI_CLASSIFIED_VAR_DEF_EMAIL_BODY, $variables, $language->language);
break;
default:
$message['subject'] = t('Classified Ad notification from !site', $variables, $language->language);
break;
}
}