When an animal bares its teeth in a smile, it’s probably performing flehmen behaviour. They can trap pheromones in their nasal passage by curling the upper lip away and exposing the teeth to the air. This is mostly true of horses and cats.
The term ‘flehmen’ roughly translates to ‘testing’. That’s exactly what the animal is doing, testing the air. Air can contain a lot of chemicals that animals release to communicate. By trapping a breath in the nose, an animals can get maximum information from a single sniff.
Look at the horse in this GIF. After having a good sniff, the young colt traps the air inside his nostrils. The chemicals and pheromones in the air he’s sniffing tell him a lot about the horse in front of him. This is an important behaviour that helps horses communicate.
Dog smiles are a different story. Dogs show their teeth in a variety of circumstances. Baring teeth can be an aggressive act where the dog warns a threat that they are armed. Dogs can also bear their teeth in a submissive smile if they want to demonstrate that they are no threat.
A seemingly relaxed dog’s smile can mean many things. The dog could want to cool down or it may be stressed out. Most dog experts, however, agree that a smile like the French bulldog has above is simply an expression of being content.
Image from flickr.com/photos/tatiana