First semi-working version of mail server RPC