We analyze the influence of a massive photon in the dispersive interaction between two atoms in their fundamental states. We work in the context of Proca quantum electrodynamics. The photon mass not only introduces a new length scale but also gives rise to a longitudinal polarization for the electromagnetic field. We obtain explicitly the interaction energy between the atoms for any distance regime and consider several particular cases. We show that, for a given interatomic distance, the greater the photon mass the better it is the nonretarded approximation. Published by the American Physical Society 2024