At present this cannot be done with events, since the variables only work in the email body. The best way to do this is to use a canned reply. When a ticket is ready to be closed, the agent can reply with the canned reply, and use the "Send and Close" option.
Eric McCarthy
Software Developer
SmarterTools Inc.
www.smartertools.com