If mucus is not secreted in the oesophagus, it can lead to erosion of the inner lining of the stomach, causing acidity and ulcers. Mucus is a slippery aqueous secretion produced by the mucous membranes, which coats the stomach and protects it from self-digestion by helping to dilute acids and enzymes. Both the cardiac and the pyloric glands are responsible for the secretion of mucus. If mucus is not secreted by the gastric glands, the stomach wall will be destroyed by the acid, since the mucus protects the stomach wall from hydrochloric acid. The hydrochloric acid will cause the erosion of the inner lining of the stomach leading to the formation of ulcers in the stomach.