adaptation of RMail library
Merge branch 'adaptation'