fix #11 et #12 for mail management