You are here

function _support_mail_text_default in Support Ticketing System 7

Same name and namespace in other branches
  1. 6 support.module \_support_mail_text_default()

Returns the appropriate untranslated default mail string for a given key. It contains tokens which are not translated yet (see support_mail_tokens(), plus "!reply")

Parameters

$key: Key for the string to return (not prepended with 'support_mail_'), or NULL to return an array of all strings.

3 calls to _support_mail_text_default()
support_admin_mail_settings in ./support.admin.inc
Settings form for email texts
support_init in ./support.module
Implementation of hook_init().
_support_mail_text in ./support.module
Returns the appropriate mail string for a given key.

File

./support.module, line 1611
support.module

Code

function _support_mail_text_default($key) {
  $info = array(
    'ticket_deny_subject' => 'Support ticket creation denied',
    'ticket_deny_body' => "System message<br />\n<br />\n\nYou have tried to create a support ticket on the !site site. The creation of the ticket has been cancelled since the e-mail address you sent the message from is not registered at our site.<br />\n<br />\nYou have to be a registered user to be able to create support tickets via mail.<br />\n<br />\nYour feedback is important to us so please register at !uri_login and try again.<br />\n<br />\n!site Team",
    'ticket_new_subject' => '!key !ticket_subject',
    'ticket_new_body' => "!update_username has created the ticket '!ticket_subject':<br />\n!ticket_url<br />\n<br />\nState: !state<br />\nPriority: !priority<br />\n<br />\n!reply:<br />\n!update_url<br />\n<br />\nTicket text:<br />\n------------------------------<br />\n!ticket_body<br />\n------------------------------<br />\n<br />\nUnsubscribe from this ticket:<br />\n!unsubscribe_ticket<br />\n<br />\nUnsubscribe from all tickets:<br />\n!unsubscribe_all",
    'ticket_comment_new_subject' => '!key !ticket_subject',
    'ticket_comment_new_body' => "!update_username has updated the ticket '!ticket_subject':<br />\n!ticket_url<br />\n<br />\nState: !state<br />\nPriority: !priority<br />\n<br />\n!reply:<br />\n!update_url<br />\n<br />\nUpdate text:<br />\n------------------------------<br />\n!update<br />\n------------------------------<br />\n<br />\nUnsubscribe from this ticket:<br />\n!unsubscribe_ticket<br />\n<br />\nUnsubscribe from all tickets:<br />\n!unsubscribe_all",
  );
  drupal_alter('support_mail_text_default', $info);
  if (isset($key)) {
    return isset($info[$key]) ? $info[$key] : '';
  }
  else {
    return $info;
  }
}