Mass is both a property of a physical body and a measure of its resistance to acceleration
What does this mean? I know of the $E=mc^2$ formula. I think, the energy required to 'accelerate' an object is the energy required to change said object's gravitational field.
More on this: This acceleration creates a 'kink' in the gravitational (or another eg. Electromagnetic) field, and I believe the energy of this 'kink' is that of the change in energy of the object.
This train of thought explains why a photon has momentum but no mass, as it's only an EM wave, not spanning to infinity, therefore changing its direction (accelerating it) does not require creating a 'kink' in it's EM wave, and therefore has no mass. This assumes that a photon emits no gravitational field.
Is this train of thought correct?
If not, what is this 'resistance to acceleration'?