Ethers can be obtained by reacting haloalkanes with alcohols through the S N 1 mechanism. The haloalkane must be secondary or tertiary to form stable carbocations.
Mechanism:
This reaction is also useful for preparing cyclic ethers, via intramolecular SN1 .
Mechanism: