A female prison officer exchanged intimate messages with an inmate, telling him he was, “the butter on my toast” and “the milk in my tea”, a court heard.