Using the formula $F=G\frac{m_1m_2}{d^2}$ where $m_1$and $m_2$ are the masses of two objects, $G$ is the gravitational constant, and $d$ is the distance between the objects, it is possible to calculate the force of the gravitational attraction between the objects in Newtons. However, since light is affected by black holes, the property required to interact gravitationally is energy, not mass.
How can I calculate the gravitational attraction between objects using their energies instead of their masses?