Glands that secrete into a hollow organ or duct are exocrine glands (exo- means: outside/outward).
'Salivary glands' and 'sweat glands and mammary glands' are exocrine glands.
Salivary glands secrete their product onto into a cavity.
Sweat glands and mammary glands are glands with ducts that secrete their products onto the outer surface.
The pancreas serves as an exocrine gland in the digestive system that secretes digestive enzymes through pancreatic ducts.