For my application, I needed to add the Client Name to the outbound email to go along with the State and Priority.
This is what I was able to get to work.

function support_mail_tokens(
- added this line
$client_client = db_result(db_query('SELECT name FROM {support_client} WHERE clid = %d', $node->client));

$tokens = array(
- added this token
'!client' => $client_client,

Since I am a NOOB to PHP, I am sure that there is probably a cleaner/easier way to declare $client_client, but this worked.

Comments

jeremy’s picture

Status: Active » Fixed

I have exported both '!client_name' and '!client_path'. Be sure to rename 'client' to 'client_name' in your email text when you upgrade. Feature implemented.

roball’s picture

Where can I configure to add the client name to the notifying e-mails, just like

Client: XY
State: new
Priority: critical

? Thanks.

jeremy’s picture

This is documented in MAIL.txt. You do so in settings.php.

roball’s picture

Thank you, just read MAIL.txt. The new !client_name and !client_path tokens are missing in the documented supported tokens.

BTW, what does the last line in notification mails (like [54:a684eceee76fc522773286a895bc8436]) mean? I can't find any documentation about that.

Thanks.

jeremy’s picture

I've updated MAIL.txt, thanks.

The [##:HEXCODE] tag found at the end of emails is used to try and filter out tickets when they are quoted in entirety when replying to tickets by email. It doesn't work all that well, sadly. If you want to discuss it further, please do so in another ticket as this ticket is about adding the client* tokens.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.