There are two types of mail servers depending on their functions:
Incoming mail servers
Outgoing mail servers