If you are asking whether it was a legal termination when you were fired for cause because you sent personal emails disparaging personnel of the employer, then the answer is that if the emails were disruptive, or if you did not stop sending them when asked to, that would be justifiable cause for termination.
However, more important is the fact that most people are employees at will and have no employment contracts or union contracts that protect them. That means that a boss can fire them at will for any legal reason other than discrimination on the basis of such things such as race, color, creed, etc. or no reason at all. If there is an employment contract, or a union, that's different.