Mesoporous carbon materials were synthesized employing polymers and silica gels as structure directing templates. The basic physico-chemical properties of the synthetic mesoporous materials were characterized by 1H and 13C MAS solid-state NMR, X-ray diffraction, transmission electron microscopy (TEM) and nitrogen adsorption measurements. The confinement effects on small guest molecules such as water, benzene and pyridine and their interactions with the pore surface were probed by a combination of variable temperature 1H-MAS NMR and quantum chemical calculations of the magnetic shielding effect of the surface on the solvent molecules. The interactions of the guest molecules depend strongly on the carbonization temperature and the pathway of the synthesis. All the guest-molecules, water, benzene and pyridine, exhibited high-field shifts by the interaction with the surface of carbon materials. The geometric confinement imposed by the surface causes a strong depression of the melting point of the surface phase of water and benzene. The theoretical calculation of 1H NICS maps shows that the observed proton chemical shifts towards high-field values can be explained as the result of electronic ring currents localized in aromatic groups on the surface. The dependence on the distance between the proton and the aromatic surface can be exploited to estimate the average diameter of the confinement structures.