When spin relaxation is governed by spontaneous emission of a photon into the resonator used for signal detection (the Purcell effect), the relaxation time $T_1$ depends on the spin-resonator frequency detuning $delta$ and coupling constant $g$. We analyze the consequences of this unusual dependence for the amplitude and temporal shape of a spin-echo in a number of different experimental situations. When the coupling $g$ is distributed inhomogeneously, we find that the effective spin-echo relaxation time measured in a saturation recovery sequence strongly depends on the parameters of the detection echo. When the spin linewidth is larger than the resonator bandwidth, the Fourier components of the echo relax with different characteristic times, which implies that the temporal shape of the echo becomes dependent on the repetition time of the experiment. We provide experimental evidence of these effects with an ensemble of donor spins in silicon at millikelvin temperatures measured by a superconducting micro-resonator.