In order to interpret cosmic ray observations, detailed modeling of propagation effects invoking all important messengers is necessary. We introduce a new photon production and propagation code as an inherent part of the CRPropa 3 software framework. By implementing additional photon production channels, which are important for energies below 10**18 eV, this code can be used for multi-messenger studies connecting the TeV and sub EeV energy regime and for interpreting models of ultra-high energy cosmic ray sources. We discuss the importance of the individual production channels and propagation effects and present example applications.