The peritoneal space communicates with the lumen of the uterus (and thus the external environment) via the fallopian tubes in females.