a photon has no mass when v=0m/s is given. its gravitational mass is 0. when travelling at a certain speed v (c in most cases) a photon has the energy E=hv. with E=mc2 you can assign a inertial mass to the photon. when creating a pair of matter / antimatter particles with photons you can observe that this inertial mass and the energy is conserved. the momentum of the photon can be calculated by p=mv or by p=h/lambda. it´s easy to show that these two equations give the same result.
that´s what i wanted to express by saying momentum, mass and energy are closely linked.