Implementation of mail system.