function makemeeting_mail in Make Meeting Scheduler 7
Same name and namespace in other branches
- 6 makemeeting.module \makemeeting_mail()
hook_mail implementation
File
- ./
makemeeting.module, line 790 - Make Meeting module
Code
function makemeeting_mail($key, &$message, $params) {
$options = array(
'langcode' => $message['language']->language,
);
switch ($key) {
// send to friends the poll link
case 'refer':
$variables = array(
'!site' => variable_get('site_name', 'Drupal'),
'!nickname' => $params['name'],
'!poll_owner' => $params['owner_name'],
'!poll_link' => url('makemeeting/' . $params['poll_url'], array(
"absolute" => TRUE,
)),
);
$message['subject'] = t('Please vote at !site', $variables, $options);
$message['body'][] = t('Dear !nickname,
please follow the link below to answer the question of !poll_owner.
!poll_link
Greetings,
!site', $variables, $options);
break;
// send notify to poll owner
case 'new_vote':
$variables = array(
'!name' => $params['name'],
'!site' => variable_get('site_name', 'Drupal'),
'!poll_link' => url('makemeeting/' . $params['poll_url'], array(
"absolute" => TRUE,
)),
);
$message['subject'] = t('New vote on !site', $variables, $options);
$message['body'][] = t('Dear !name,
somebody voted on your poll!
Check it at the following link:
!poll_link', $variables, $options);
break;
case 'create_new_poll':
$variables = array(
'!name' => $params['name'],
'!site' => variable_get('site_name', 'Drupal'),
'!poll_link' => url('makemeeting/' . $params['poll_url'], array(
"absolute" => TRUE,
)),
'!admin_link' => url('makemeeting/' . $params['admin_url'], array(
"absolute" => TRUE,
)),
);
$message['subject'] = t('Created new poll');
$message['body'][] = t("Dear !name,\n\nyour poll created successfull!\nYour poll's link are the following:\n\nPoll link: !poll_link\nAdmin link: !admin_link", $variables, $options);
break;
}
}