  We describe how a structured photonic medium controls the spontaneous
emission rate from an excited quantum dot in the presence of electron-phonon
coupling. We analyze this problem using a polaron transformed master equation
and we consider specific examples of a photonic crystal cavity and a coupled
cavity waveguide. We find that when the relaxation times of the photon and
phonon baths are comparable, phonons influence spontaneous emission in a
non-trivial way. We demonstrate why and how the broadband frequency dependence
of the local photon density of states determines the photon emission rate,
manifesting in a complete breakdown of Fermi's golden rule. For a single cavity
resonance, we generalize Purcell's formula to include the effects of
electron-phonon coupling. For a waveguide, we show a suppression and a 200-fold
enhancement of the photon emission rate.
