.sh_functions: Merged checkmail() and getmail() into one function