get_mail: better outputs handling