check ip before sending