A Revenue Service employee sent text messages to his supervisor in which he threatened to rape women.
Derek Leggett (52) of Tara Lawns, Ashbourne, Co Meath, sent the woman 17 text messages saying such things as "kill kill kill kill kill" and "I'm raping my next victim now".
A court heard he had a grievance with his employers as he had requested a transfer that was not granted.
Leggett, who was remanded in custody for sentence next May, pleaded guilty at Dublin Circuit Criminal Court to harassing his victim between January 25 and March 3 last year. He faces a maximum sentence of seven years.
Judge Martin Nolan asked probation authorities to ascertain what could be done to ensure he did not pose a danger to society on his release.
Garda Triona Harrison told prosecuting counsel Tara Burns that Leggett worked as a clerical officer in the Customs and Excise Department in Dublin Airport and his victim was his supervisor. In late January he sent a text to her official work phone stating: "I am not well." He sent a similar message a few days later before sending a another message: "Kill kill kill kill kill."
When the woman rang the number back she got a voicemail greeting and recognised Leggett's voice. She informed her supervisor and a meeting was set up between the parties.
At the meeting Leggett handed her a greeting card in which he had written that he was "extremely sorry." He was also asked by his employers to attend his GP.
When the victim contacted him to see how the doctor's visit had gone, she received a reply by text saying: "Rape rape rape rape rape."
Other messages read: "If not you, then who?", and "not convicted, but I know my crimes".
Another text read: "Call the cops before I rape my next victim" while another stated: "I'm raping my next victim now."
His final text read: "Why did you not call the police? Hope you are having a good day."
On March 9, 2010, she found a letter on her desk in work from Leggett saying that he was sorry and that he was without his correct medication. She reported the matter to gardai and when they went to speak to Leggett they found him in a distressed and rambling state.
Ms Burns said the victim felt under threat at the time and felt an enormous amount of responsibility resulting from Leggett's claims that he was raping women. Ms Burns said the woman was "gravely concerned" about his release and wanted no further contact from him.
Defence counsel Cathleen Noctor said Leggett had a lengthy history of mental health and alcohol problems. He was currently applying for early retirement on medical grounds.