It looks like you have cribbed the code from here ..https://www.mssqltips.com/sqlservertip/3489/configure-sql-server-alerts-and-notifications-for-alwayson-availability-groups/
...have you updated the job_id to your specific job ids in your code?
If not use the link as a reference
Hope this helps
SQL DBA
Every day is a school day, and don't trust anyone who tells you any different.
http://sqlblogness.blogspot.co.uk