The open-pit mine production scheduling problem has received a great deal of attention in recent years, both in the academic literature, and in the mining industry. Optimization approaches to strategic planning for mine exploitation have become the industry standard. However most of these approaches focus on extraction sequencing, and don't consider the material flow after mining. In particular, the use of stockpiling to manage processing plant capacity, and the interplay of material flows from mine to stockpile, mine to processing plant and stockpile to plant, has not been treated as an integrated part of mine schedule optimization. One of the key reasons is that material of different grades becomes mixed on a stockpile, leading to difficult nonconvex, nonlinear optimization models. Here we show that the special structure of such models can be exploited to yield effective algorithms that incorporate post-mining material flows and stockpile management as an integrated part of mine production scheduling. The results give a more realistic assessment of the NPV that can be realized by a mining project than is possible with current approaches. We address the solution of the open pit mine production scheduling problem (OPMPSP) with a single stockpile (OPMPSP+S). The addition of a stockpile adds a relatively small number of quadratic constraints to the formulation of the OPMPSP and turns the problem from a mixed-integer linear into a mixed-integer nonlinear program. We develop several extended formulations of the OPMPSP+S and discuss the strength of the linear outer approximations obtained by relaxing their nonlinear constraints. We also introduce an aggressive branching scheme that can force the violation of the quadratic stockpiling constraints to be arbitrarily close to zero and a primal heuristic that produces a fully feasible solution of OPMPSP+S from an integer feasible solution of OPMPSP which violates these constraints. Combining these two techniques with a branch-and-bound approach,we obtain an algorithm that yields fully feasible solutions of OPMPSP+S arbitrarily close to the optimum. Experimental results for realistic benchmark instances show that this algorithm is very efficient in practice. Our methodology is easily extendable to multiple stockpiles.