refactor sendActivity and all for toIpAddress