Mail.app with GMail IMAP very slow?

For the last two days I watched as Leopard’s Mail.app tried to download 1 email at an average of 1kb per second.
My internet connection in general was fine yet it looked like it was going to take Mail the entire duration of Lent to download this email.

I figured I must have a setting wrong. I checked Google’s IMAP configuration instructions for Mail 3.x on Leopard. No Joy.
I tried using the information they provided for Mail 2.x setup. Those emails were still crawling down.

Finally I checked Google’s details for configuring other IMAP clients
It says you can use either port 465 or 587 for outgoing mail. I had been using 587, so I changed to port 465. Hey presto! Emails are now flying down. I don’t understand how a dodgy setup for outgoing mail could affect my incoming mail but I’m more than relieved to see Mail.app doing it’s thing now.