A woman ran a campaign of harassment, sending threatening messages to a former friend in breach of a court injunction.