/build/static/layout/Breadcrumb_cap_w.png

How Do I Include The CC Field In NEWTICKETEMAIL Sql Code?

I use a code very similar to this one linked, to send New Ticket emails to our IT department.
http://www.itninja.com/blog/view/issue-with-sql-code-kace-service-desk-new-ticket-notification-email

Is there a way to modify this line:

'helpdesk@mycompany.com' AS NEWTICKETEMAIL -- $newticketemail

FROM HD_TICKET

So that i could include the emails in the CC field as well?


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: chucksteel 10 years ago
Red Belt
1
The CC field is stored in the CC_LIST column so if you can select it in the rule and use CC_LIST as the email column. If you want to email both helpdesk@mycompany.com and the addresses in the CC_LIST column then you would use the following:
concat_ws(',', 'helpdesk@mycompany.com', CC_LIST) AS NEWTICKETEMAIL



Comments:
  • Got the following error:
    mysql error: [1052: Column 'CC_LIST' in field list is ambiguous] in EXECUTE("SELECT -- ticket fields HD_TICKET.ID AS TICKNUM - zipperson 10 years ago
    • Right. HD_CATEGORY also has a CC_LIST column and it's also included in the query. I should have specified HD_TICKET.CC_LIST. - chucksteel 10 years ago
      • Got it working now! Thanks very much for your help! - zipperson 10 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ