I need to receive an email notification whenever a user creates a ticket or a ticket gets updated. Fossil has something called ticket hook, which is accessible in the UI from admin -> transfers -> Ticket
. I have tried the following code from here:
set project simpletask
tclInvoke package require http
query {SELECT title, status
FROM ticket
WHERE tkt_uuid=$uuid} {
set title [tclInvoke http::formatQuery $title]
http -asynchronous -- http://127.0.0.1/cgi-bin/tkt-hook?uuid=$uuid&title=$title&status=$status&project=$project
}
I expect this code to be executed once a ticket is modified, but I don't really know how to modify it to send an email, and how I can specify to whom the email should be sent to.
Does anyone have a sample TH1 code for sending email notifications that can share?