The line assigning mailbodymailbody is wrong. You're calling the contents of $body$body and/or $body1$body1 as a shell command line.
Replace
mailbody=$([ "$applicationstatus" == 200 ] && $body || $body1)
With
[ "$applicationstatus" = 200 ] && mailbody="$body" || mailbody="$body1"