We have developed a modified form of the equations of smoothed particle magnetohydrodynamics which are stable in the presence of very steep density gradients. Using this formalism, we have performed simulations of the collapse of magnetized molecular cloud cores to form protostars and drive outflows. Our stable formalism allows for smaller sink particles (< 5 au) than used previously and the investigation of the effect of varying the angle, ϑ, between the initial field axis and the rotation axis. The nature of the outflows depends strongly on this angle: jet-like outflows are not produced at all when ϑ > 30°, and a collimated outflow is not sustained when ϑ > 10°. No substantial outflows of any kind are produced when ϑ > 60°. This may place constraints on the geometry of the magnetic field in molecular clouds where bipolar outflows are seen.