TORONTO -- Luka Magnotta, accused of killing and dismembering a Chinese student, was treated for paranoid schizophrenia, though his doctor said he didn't always take his medication.

A letter from Magnotta's psychiatrist was attached to the court file of his 2005 conviction for fraud in Toronto and offers a glimpse into the mind of the man now accused in the gruesome slaying and dismemberment of 33-year-old Jun Lin.

Magnotta, 30, then known by his birth name, Eric Newman, suffered from paranoid schizophrenia since at least 2000 and was hospitalized several times, Dr. Thuraisamy Sooriabalan wrote.

"The treatment consists of taking antipsychotic medications and attending (the) outpatient department for supportive psychotherapy and health education," wrote the doctor based at the Rouge Valley Health System's Centenary site in Toronto.

"Unfortunately Mr. Newman is not very regular in attending the outpatient department and as a result he misses his medications."

At the time of the letter, written in May 2005, Magnotta had not seen his psychiatrist since February, despite being told to return in a month for continuation of his medication, Sooriabalan wrote.

The psychiatrist assessed Magnotta's prognosis as "fair," as long as he took his medication. If he doesn't, he would be prone to a relapse of his symptoms, which include paranoia, auditory hallucinations and fear of the unknown, Sooriabalan wrote.

The letter was released Wednesday after several media outlets fought for it to be made public.

A Globe and Mail reporter had been trying to obtain the letter, a public document, since July, but was rebuffed in several attempts. Various media outlets then joined together to hire counsel to make arguments to a judge for the letter's release.

Magnotta's lawyer Luc Leclair tried to stop the letter from becoming public, but Ontario Court Judge Fergus O'Donnell ruled Tuesday afternoon that it should be released.

It does contain sensitive and personal medical information, O'Donnell said in his ruling, but any privacy interest was foregone when the letter was filed in open court.

"Without access to the letter, the public is not in a position to engage in a meaningful assessment or debate over the appropriateness of what happened to Mr. Newman in 2005 in what is supposed to be an open and transparent court process," O'Donnell wrote.

The letter was tendered in court after Magnotta pleaded guilty to four fraud-related charges in 2005. The judge read the letter before she imposed a nine-month conditional sentence. She said she could only order him to take his medication for the nine-month period, but hoped he would continue taking it after that.

"Sir, you have got a medical problem and you need to always take medication," Judge Lauren Marshall said, the transcript shows.

"If you do not, your life is going to get messed up."

Magnotta admitted to taking advantage of a young woman with a diminished mental capacity who he had met online. He admitted that he got her to apply for credit in her name at stores such as Sears and The Brick then used it to get various merchandise. The stores were out thousands of dollars. He also got a credit card in the woman's name.

A preliminary hearing for Magnotta is underway in Montreal, where he faces several criminal charges, including first-degree murder.