The function of mammary glands is to provide nourishment for offspring by producing milk for the infant to ingest. The number of mammary glands can vary from species to species, ranging from two to 25.
The mammary glands in all mammals are made up of lobules that are subdivided by fat and stoma. Each of the lobules contains alveoli which synthesize milk. The myoepithelial cells squeeze the milk into the cavity of the alveolus. The milk produced at the beginning of lactation is called colostrum, and it contains antibodies that an infant needs until his or her own immune system builds up. This gives the infant a passive immunity for a time. This is important because not all of the needed antibodies are passed during the pregnancy.