Why does a horse have green foaming from the mouth?

Horses usually "work" (play with) the bit with their mouths, which causes them to salivate. The greenish tint usually just comes from leftover food.