If your Squid proxy server is setup only to do ports 80 and 443 it is only doing http and https protocols. If your trying to access an IMAP account you need ports 993 and/or 143 to be proxied. However this will mean you need Squid to be configured to also support that which is via a different type of proxy called a SOCKS proxy. Squid can do both SOCKS and http/https parodying at the same time.
If your connecting to an Microsoft Exchange Web Services (EWS) server then this as its name suggests it uses standard web i.e. http/https protocols and will work with ports 80/443.
It sounds therefore that you are trying to connect to an IMAP server, unless SOCKS is setup then you will be blocked.
If you are trying to access a corporate mail server then the IT department should set things up to enable this e.g. by setting up a SOCKS proxy server. If you are trying to access a personal email account e.g. Google Gmail then you are going to have to use webmail. Personally for personal email I far prefer using a webmail interface as then my personal emails are not stored on the companies computers.
If you are trying to access a corporate Microsoft Exchange server then it is possible EWS has been disabled as Windows clients do not use this protocol, again the IT department should ensure that they provide the services needed to support Macs if Macs are being supplied to users. If the company is providing Macs to users and the IT department is failing to set things up to allow those Macs to connect then the IT department is failing in their job and the person responsible should be replaced with someone better up to the job.