Just to clarify, I was asking if the original dialogue box was to do with AirPort, not the Mail ones. Generally when Mail asks for your password it's entirely the fault of your ISP although this may not be the case here...
FWIW, it's a pretty well known problem of 10.4.2 and later that logging in will sometimes give a dialogue box asking for a password. I don't know of a fix, or even if there is one, but I know that cancelling it is fine.