  \emph{Resonance Casimir-Polder interaction(RCPI)} occurs in nature when one
or more atoms are in their excited states and the exchange of real photon is
involved between them due to vacuum fluctuations of the quantum fields. In
recent times, many attempts have been made to show that the curved spacetime
such as the \emph{de-Sitter spacetime} can be separated from a \emph{thermal
Minkowski spacetime} using \emph{RCPI}. Motivated from these ideas, here we
study the \emph{RCPI} between two atoms that interact with a massive scalar
field in Schwarzschild spacetime provided the atoms are placed in the
near-horizon region. Subsequently, we use the tool of the \emph{open quantum
system} and calculate the Lamb shift of the atomic energy level of the
entangled states. We show that the behavior of \emph{RCPI} modifies depending
on the mass of the scalar field. In the high mass limit, the interaction
becomes short-range and eventually disappears beyond a characteristic length
scale of $1/m$, where $m$ is the mass of the scalar field.
