CNN Exclusive: Email may derail case against Bill Cosby (CNN)A former district attorney in Montgomery County, Pennsylvania, claims he agreed more than a decade ago that his office wouldn't use a civil deposition given by Bill Cosby in any criminal matters, an email obtained by CNN shows -- a revelation that could call into question the viability of the criminal case against the comedian. The 2015 email -- sent by former District Attorney Bruce Castor to successor Risa Vetri Ferman -- details an apparent verbal agreement the prosecutor had a decade earlier with Cosby's attorneys for Cosby to testify in a civil sexual assault case brought against him in 2005. In the email, Castor writes that his intent in making the deal was to create an atmosphere in which Cosby accuser Andrea Constand would have the best chance of prevailing in her civil suit against the 78-year-old comedian by removing the prospect of Cosby invoking his 5th Amendment right. The email was sent three months before criminal charges were filed against Cosby in Montgomery County in December, and could call into question the viability of the case, CNN has learned. In it, Castor writes to Ferman: "I can see no possibility that Cosby's deposition could be used in a state criminal case, because I would have to testify as to what happened, and the deposition would be subject to suppression.