Energy Quotes - page 100
E = mc2 really applies only to isolated bodies at rest. In general, when you have moving bodies, or interacting bodies, energy and mass aren't proportional. E = mc2 simply doesn't apply. ...For moving bodies, the correct mass-energy equation is
E=\frac {mc^2} {\sqrt{1-\frac{v^2} {c^2}}}
where v is the velocity. For a body at rest (v=0), this becomes E = mc2. ...we must consider the special case of particles with zero mass... examples include photons, color gluons, and gravitons. If we attempt to put m = 0 and v = c in our general mass-energy equation, both the numerator and denominator on the right-hand-side vanish, and we get the nonsensical relation E = 0/0. The correct result is that the energy of a photon can take any value. ...The energy E of a photon is proportional to the frequency f of the light it represents. ...they are related by the Planck-Einstein-Schrödinger equation E = hf, where h is Plank's constant.
Frank Wilczek