This is a reaction between a Halogenalkane and Amnonia, which occur in ethanol and it also occur in various steps
CH3CH2CH2Cl + NH3 -> CH3CH2CH2NH3+ + Cl-, this is one possibility of outcome from this reaction where we have the substitution between amnonia and the halogen ion