The mammary glands of the female undergo differentiation during pregnancy and start producing milk towards the end of pregnancy by the process called lactation.
During pregnancy, estrogen and progesterone are secreted in large quantity either from corpus luteum or placenta.
Apart from these, the human chorionic somatomammotropin (HCS) secreted by placenta also is responsible for the growth of breasts.
There is no lactation during pregnancy because progesterone level is high and it inhibits the release of prolactin.
After delivery, since the concentration of progesterone falls earlier than the estrogen, prolactin secretion starts and lactation commences in about 1-3 days.
Thus milk secretion is due to prolactin but ejection of milk is due to Oxytocin