Add missing db access functions
Fix storing of mail part bodies
1-based cids
Add missing websocket TODO