[Fix bug 967026][Fix bug 970395] Fix inactivity notification emails.