Results of experimental and theoretical studies on the Sn119 Mössbauer effect in SnCl4 molecules confined in porous glass are presented. A physical model, based on the assumption that diffusion is hindered in the pores, is developed. It is further assumed that the molecules in each pore form a harmonic lattice with fixed boundary conditions. The thermal-vibration amplitudes of the particles are calculated by using a normal-mode expansion satisfying fixed boundary conditions. It is rigorously shown that the transformation diagonalizes the Hamiltonian of the system, allowing subsequent use of standard calculational methods to derive expressions for the recoilless fraction and the second-order Doppler shift in restricted geometry. The result allows evaluation of these quantities for molecules at different sites in the lattice. Experiments were made with two Vycor-glass carriers at several temperatures below and above the 240-K freezing point of bulk SnCl4. The samples have average pore diameters of 40 and 36. Mössbauer data of confined SnCl4 reveal a resonance line shift corresponding to the solid-liquid transition. This change in isomer shift is attributed to volume expansion of SnCl4 at its melting point. The measured temperature dependence of the recoilless fraction of the confined SnCl4 molecules is explained by the theoretical model. With one adjustable parameter, the theory reproduces both the absolute level and the temperature slope of the experimental data for two spectral components corresponding to SnCl4 molecules at different locations in the pore.