Effects of confinement on mechanical, structural and thermodynamic properties of uniform fluids are very well understood. In contrast, a general theory based on statistical thermodynamics for confined nonuniform and non-isotropic phases, such as the lamellar phase, is in its infancy. In this review we focus on the lamellar phase confined in a slit or in a pipe in order to illustrate various effects of confinement. We limit ourselves to the results obtained by M. Tasinkevych, V. Babin and the author for lamellar phases in oil-water-surfactant mixtures within a generic semi-microscopic model, using a mean-field approximation. We show that compared to isotropic fluids the excess grand potential contains additional terms associated with structural deformations. These terms depend on the type of the confining walls, the shape of the container and on the thickness of the lamella. As a result of the dependence of the structure of the confined lamellar phase on the shape of the container, capillary lamellarization and capillary delamellarization is found in slits and in pipes respectively.