The female Drosophila melanogaster fly undergoes behavioral changes after mating, including an increase in egg laying and an avoidance of remating. Accessory-gland products elicit these changes transiently when introduced into unmated female flies. We report here the generation and phenotype of flies that lack functional accessory-gland main cells as a consequence of genetically directed delivery of diphtheria toxin subunit A to those cells. Only main-cell secretions are essential for the short-term inhibition to remating; no other products of the genital tract can replace their function. Long-term inhibition to remating depends only on the storage of sperm in the female. Both sperm and main-cell secretions have roles in the increase of egg laying by the mated female. In addition to full-strength diphtheria toxin, we used low-activity toxins to kill only those cells that express toxin at high levels. These transgenic strains that express diphtheria toxins of different strengths in accessory-gland main cells will be useful in further defining the role of these cells.