Change email sending to use RPC service.