Now that you have brought my attention to the fact that you "Did" say your iPhone worked. That is something you can use to compare and contrast.
First, was the iPhone using WiFi or cellular data? Both are useful data points.
If cellular data, then you were most likely using a different ISP (the local cellular phone company vs the company providing broadband to the WiFi access point). And even if it is the same company offering Broadband and Cellular, it is possible that they are using different DNS servers for each service.
If the iPhone was using WiFi, then you should be able to see which DNS server it was using via Settings -> WiFi -> ( i ) -> DNS. I do not know how to find the DNS server if you were using cellular.
You can also look at the mail client settings on your Mac vs your iPhone to see if there are any significant differences.
Anything that might be handled differently between the Macbook Pro and the iPhone is worth checking to see if there is anything that would explain why one works and the other does not.