Mammals have three distinct sorts of glands which give off substances to the surface of the body. None of these occur in reptiles. They are sweat glands, mammary glands and scent glands. Smells are vitally important to most mammals. Even humans, with our much reduced olfactory senses, are greatly affected by smells hence the success of the perfume industry and of aromatherapy.
In other mammals scent is an integral part of every day communication with the rest of the world. Through smell animals can tell what other species of animals share their world and within a species specially deposited scents pass on information concerning an individual's sex, social status, breeding condition and state of health. Scent glands then are very important and occur in a variety of places around the mammal body. Many mammals have more than one set of scent glands. A small survey reveals that Male deer have scent glands on their lower legs, elephants have them behind their eyes, capybaras on top of their snouts, canines on their feet, antelopes on their cheeks, hyraxes in the middle of their back and numerous species have them associated with their genital area which allows them to mix small amounts of volatile but concentrated compounds with their faeces and or urine.
Like mammary glands, scent glands are probably modified sweat glands.
Some animals use scent to mark out their territories either by depositing faeces or urine at marker points or by rubbing their scent glands on prominent parts of the environment - branches, rocks, etc. Other mammals use scents to communicate simply by releasing them into the air, this normally applies to social scents indicating status and sexual state. Finally, some animals such as the skunks use their scent glands or the substances produced in them as a means of defence.