Decay of excited molecules in absorbing planar cavities