Added mail directory argument to folder_addmsg in order to make it possible