TCP ports can get a bit confusing. Outbound connections use ephemeral ports which can be anything above 1024 that is not used.
Your ISP will give you the mail server's TCP port to connect to. Here is the listing of Common TCP/IP Ports.
Most mail servers which offer POP3 use 110 or for IMAP use 143 ports. To use SSL/TLS encrypted ports: POP3 uses 995 and IMAP uses 993. Its also possible your company uses their own port assignment to help protect their firewall.
Now to confuse you! You'll need to check with your provider if they offer IMAP services. Many only offer POP3 and if you want IMAP you need to pay more for the service.
Most likely your ISP bounced you from IMAP to POP3 either because they no longer offer it or you have to pay the premium for it and hadn't.