added new flag params to addMessageToFolder