Donald Kennedy, formerly of Conisborough Road, Provanhall, Glasgow, believed he was dealing with two 13-year-old girls but was communicating with their concerned mothers instead.
Judge Lord Burns told Kennedy, 29, at the High Court in Edinburgh: "It is worrying you have shown such a persistent attitude towards your attraction to young girls of 12 and 13."
Lord Burns ordered that Kennedy, a father-of-two, be kept under supervision for a further four years. He was warned he could be returned to prison during that period if he failed to comply with licence conditions.
The court heard that one mother, who confiscated her daughter's mobile after she ran up a bill more than double the normal amount, found a barrage of text messages and calls had been sent to her by Kennedy. She sent texts to him and fooled him into believing he was dealing with the girl.
In messages he made a reference to sex and the mother confronted her daughter, who admitted she had been having intercourse with Kennedy. The sex took place on about seven occasions.
Kennedy was detained by police and a court order then banned him from possessing or using a device capable of electronic communication or accessing the internet without telling police.
But Kennedy targeted another teenager and when her mother found she also contacted police.
He later admitted charges of underage sex, breaching a court order and contacting a 13-year-old while prohibited from communication with children under 16.