Sends emails via PHP and returns response as JSON.