Moves SMTP connection layer to a general implementation