implements mail client