In mammography, the image contrast and dose delivered to the patient are determined by the x-ray spectrum and the scatter to primary ratio S/P. Thus the quality of the mammographic procedure is highly dependent on the choice of anode and filter material and on the method used to reduce the amount of scattered radiation reaching the detector. Synchrotron radiation is a useful tool to study the effect of beam energy on the optimization of the mammographic process because it delivers a high flux of monochromatic photons. Moreover, because the beam is naturally flat collimated in one direction, a slot can be used instead of a grid for scatter reduction. We have measured the ratio S/P and the transmission factors for grids and slots for monoenergetic synchrotron radiation. In this way the effect of beam energy and scatter rejection method were separated, and their respective importance for image quality and dose analyzed. Our results show that conventional mammographic spectra are not far from optimum and that the use of a slot instead of a grid has an important effect on the optimization of the mammographic process. We propose a simple numerical model to quantify this effect.