{if $newTicket}
    <p>Ticket #<a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}"><strong>{$ticket_tid}</strong></a> has been opened by <strong>{$changer}</strong>.</p>
    <p>
        Client: {$client_name}{if $client_id} #{$client_id}{/if}<br />
        Department: {$ticket_department}<br />
        Subject: {$ticket_subject}<br />
        Priority: {$ticket_priority}
    </p>
    <div class="quoted-content">
        {$newTicket}
    </div>
{else}
    <p>Ticket #<a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}"><strong>{$ticket_tid}</strong></a> {if $newReply || $newNote}has had a new {if $newReply}reply{else}note{/if} posted by{else}has been updated by{/if} <strong>{$changer}</strong>.</p>

    {if $changes}
        <table class="keyvalue-table" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt;">
            <tbody>
                {foreach $changes as $change}
                    <tr>
                        <td>{$change@key}:</td>
                        <td>
                            <span style="background-color:#ffe7e7;text-decoration:line-through;">{$change.old}</span>
                            &nbsp;
                            <span style="background-color:#ddfade;">{$change.new}</span>
                        </td>
                    </tr>
                {/foreach}
            </tbody>
        </table>
    {/if}

    {if $newReply}
        <div class="quoted-content">
            {$newReply}
        </div>
    {/if}

    {if $newNote}
        <div class="quoted-content">
            {$newNote}
        </div>
    {/if}

    {if $newAttachments}{$newAttachments}{/if}
{/if}
<p>
    You can respond to this ticket by simply replying to this email or through the admin area at the url below.
</p>
<p>
    <a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}">
        {$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}
    </a>
</p>