A UK court has granted bail to a teenager arrested for launching five million emails at his ex-employer.