$ 0 0 A man who admitted sending offensive text messages to his ex-partner has been told he must seek treatment for his mental health problems.