REF #4028 mail refactored