diff --git a/add_todo.sh b/add_todo.sh index 317a553..b4bbcb4 100755 --- a/add_todo.sh +++ b/add_todo.sh @@ -31,6 +31,7 @@ if [ "$_task_id" != null ] ; then echo "Task created: $_task_id" else echo "Error: $_result" + printf "Subject: Fail: Todo: '%s'\n\n%s\n----------------------\n%s" "$_title" "$_result" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk exit 6 fi @@ -42,7 +43,9 @@ _result="$(curl --user $_api_auth \ _status="$(echo "$_result" | jq '.result')" if [ "$_status" = true ] ; then echo "Task moved: $_status" + printf "Subject: OK: Todo: '%s'\n\n%s" "$_title" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk else echo "Error: $_result" + printf "Subject: Fail: Todo: '%s'\n\n%s\n----------------------\n%s" "$_title" "$_result" "$_description" | sendmail -f server@gabbaell.co.uk kanboard.docker@gabbaell.co.uk exit 9 fi