  We study the intergalactic transmission of radiation in the vicinity of the
Ly{\alpha} wavelength. Simulating sightlines through the intergalactic medium
(IGM) in detailed cosmological hydrosimulations, the impact of the IGM on the
shape of the line profile from Ly{\alpha} emitting galaxies at redshifts 2.5 to
6.5 is investigated. In particular we show that taking into account the
correlation of the density and velocity fields of the IGM with the galaxies,
the blue part of the spectrum may be appreciably reduced, even at relatively
low redshifts. This may in some cases provide an alternative to the
often-invoked outflow scenario, although it is concluded that this model is
still a plausible explanation of the many asymmetric Ly{\alpha} profiles
observed. Applying the calculated wavelength dependent transmission to
simulated spectra from Ly{\alpha} emitting galaxies, we derive the fraction of
photons that are lost in the IGM, in addition to what is absorbed internally in
the galaxies due to dust. Moreover, by comparing the calculated transmission of
radiation blueward of the Ly{\alpha} line, the total optical depth to Thomson
scattering of cosmic microwave background, with corresponding observations, we
are able to constrain the epoch when the Universe was reionized to z <~ 8.5.
