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:
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:
Please log in to answer
Posted by:
chucksteel
10 years ago
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