The port number often tells you which role a connection is trying to perform.

PortTypical use
25SMTP server-to-server relay
465SMTP submission with implicit TLS
587SMTP message submission
110POP3
995POP3 with implicit TLS
143IMAP
993IMAP with implicit TLS

These are standard service assignments, not a guarantee that every provider exposes every service.

Do not use port 25 for an end-user application merely because “SMTP uses 25.” Submission and relay have different trust and policy models.

Reference material