#7 set alarm table and check alarm.
#7 check stat alarms and info alarms.
#7 write the send_mail function.

Not finished yet.