Added mail support and metastate protocol stuff for confirm and register stub.