I know a quick and dirty way to do it in a course, but you said "system." To do the system report you need to have admin permissions.
Site Administration > Users > in accounts > bulk user actions > in New Filter > Show more > Last Access > is before [choose a date] > enable
Once you run it, go down to Users in list > select all users > click Add to selection
Drop down to With selected users . . . and choose Send a message
Be aware that, if you are talking about hundreds of students, such a message may be perceived as spam.