Write back and tell him/her to stop. In the emails, also mention you have concerns about the communication between him/her and the kids. In short, be assertive.
If it continues, then take the emails to the cops and tell them you feel intimidated. You might find the cops will be prepared to make an AVO against the ex on the grounds of the harassing emails. If not then learn to ignore, ignore, ignore...
I've been in the same situation. Best day of my life is when I taught myself not just to ignore the emails / offensive crap, but to completely emotionally switch off to it. All of a sudden I felt calm and it was great.
Oh and as far as the kids go - look, you can't control what other people say / do, but you can control what you say / do. In my case, the kids started to perceive their mum's actions / words / behaviour as the problem. In short, they sided with me. One day, when I was picking up the kids and my ex was ranting at me for something stupid, my 9 year old told her mum to leave me alone. My little girl was displaying the sort of behaviour I've always tried to teach, show respect and stand up against bullying.
When you say something negative to a child about their parent, the result will ALWAYS be that the child disrespects the person who is saying the negative. Kids are good like that.