In conclusion, this study demonstrated at the histopathological, cellular apoptosis, and transcriptomic levels that E. coli infection induces mammary tissue damage and apoptosis by activating immune and inflammation-related genes (S100A12, IL1RN, IL1R2, CXCL8, SAA3, S100A8, S100A9, TREML2, TREM1, M-SAA3.2, PTX3, MMP9) and key signaling pathways (TNF signaling pathway, C-type lectin receptor signaling pathway, Chemokine signaling pathway, NOD-like receptor signaling pathway, NF-κ B signaling pathway, IL-17 signaling pathway). The gene discussed is IL17A; the disease is escherichia coli infection.