The invention provides a microcapsule having a shell and a liquid core incorporating a self-microemulsifying system or a microemulsion, wherein the core comprises a lipophilic substance, at least one surfactant, an active agent, optionally a cosolvent and a gelling agent. Furthermore, a method for producing such microcapsules and pharmaceutical formulations comprising such microcapsules is provided.