A Northamptonshire teacher standing trial for rape admitted it was a mistake to send two boys a large number of text messages.
The history teacher denied all the charges against him
History teacher Wasim Majid, 27, told Northampton Crown Court he should have listened to advice from his seniors when they tried to warn him about the dangerous position he was getting in to.
Mr Majid is accused of raping one 15-year-old boy and two charges of indecency with a child and two counts of indecent assault.
He denied all charges.
The teacher is alleged to have indecently assaulted one boy at the child's home before raping him.
He is also accused of indecent assault on a second boy who claims the incident took place when he helped the defendant move house.
Mr Majid, of Aylesbury Street, Wolverton, Buckinghamshire, said at court on Monday, he had never been to the boy's house and the second boy had never been to his home.
He said he had struck up relationships with two boys at school after they asked him for help with bullying about their sexual orientation.
He also admitted to sending text messages to the pair - records showed he sent 1,500 messages, including 93 to one child on St Valentine's Day 2002.
Mr Majid explained to the court: "I'm a textaholic. I'm always on the phone texting. It's an easy form of communication.
Secret soured relationship
"I would text them about problems at school. It could relate to problems outside of school, it could be to do with sport or interests."
He added there were a lot of messages on St Valentine's Day as this was when one boy had gone public about being bisexual and needed support.
Mr Majid was warned about the messages by a senior member of staff at the school, but chose to continue.
He said: "I didn't appreciate what they were trying to tell me. They were trying to tell me not to get too close to the children and leave myself open."
Mr Majid claimed his "mentor" relationship with the two boys soured when he let a secret slip in class that one boy had performed a sex act on another pupil.
He was suspended from his job and police were informed of the alleged assaults in December 2002.
The trial continues.