Updated example script
Add support for emailing tickets