It depends on how they broke up. Was it a flat out..."We are through" or did they just drift apart. Maybe it wasn't put clearly enough to the ex-girlfriend.
Try also getting in contact with someone whom she knows and trusts. Her parents for example. People like this would be able to sit her down and explain to her that although no one wants to hurt anyone, she needs to move on and find someone else as her boyfriend did.
As far as I know you don't have to accept text messages, and you may be able to block them (talk to your phone provider) or change your number....don't notice the drive-by. Some people will always want attention, even if it has to be negative attention. Depending how long ago the breakup was, time will heal broken hearts.