[FIX] mail: misc bug fixing

get_object_reference already raises an error ...