At the High Court in Glasgow, Paul Sinclair, 24, was convicted of raping the woman, who cannot be named for legal reasons, at Greenock Cemetery.
The court heard Sinclair claimed that the text saying "I'm going to rape you" was a joke and he had also been sending "flirty messages" to the 30-year-old.
Jailing Sinclair yesterday, judge Lord Matthews also put him on the sex offenders' register indefinitely. In evidence, the woman said that she told Sinclair: "We can't be anything more than friends. I'm happy with my family and my life."
The woman told the court that she thought Sinclair was a friend because she could confide in him about her mother's death.
She had gone out in his car and even when he drove to a secluded spot at Greenock Cemetery, she said she was not worried and added "I felt safe".
But, after parking up, the father-of-two attacked her. Sinclair had denied the attack.