Radiation of atoms in a resonant environment