Other types of infections can also affect the salivary glands. For example, infections that start in nearby lymph nodes can spread to the salivary glands.