function _birthdays_mail_text in Birthdays 6
Check which e-mail strings should be retreived, and fill in the default placeholders. Uses the same method as _user_mail_text().
2 calls to _birthdays_mail_text()
- birthdays_admin_settings in ./
birthdays.admin.inc - Generates the Birthdays admininistration form located at ?q=admin/settings/birthdays.
- birthdays_mail in ./
birthdays.mail.inc - Implementation of hook_mail().
File
- ./
birthdays.module, line 1060 - The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an e-mail on their birthday automatically, and the administrator can receive daily reminders of…
Code
function _birthdays_mail_text($key, $language = NULL, $variables = array()) {
$langcode = isset($language) ? $language->language : NULL;
// If the text is not the default, run it through strtr() to fill in the
// placeholders.
if ($text = variable_get('birthdays_send_user_' . $key, FALSE)) {
return strtr($text, $variables);
}
else {
// Which text do we want to retreive?
switch ($key) {
case 'subject':
return t('Happy Birthday, !username!', $variables, $langcode);
case 'message':
return t("Hey !username,\n\nHappy birthday!\nWe hope you have a great day\n\nThe !site-team\n!uri_brief", $variables, $langcode);
}
}
}