extended the lock message for users
added variables for mailing
added locking and mail functionality. corrected checkReturnStatus function