The team over at MessageOps have released a great script that takes data from your public folders and replicates it to SharePoint Online as part of your migration away from an on-premise Exchange environment. You can read more about it here: http://www.messageops.com/public-folder-message-data-and-sharepoint-online