I was having this problem on my iMac last night, until I realized that I had to change the port to 587 (my ISP for some reason blocked outgoing mail from port 25. This is how.
Under the "Accounts" tab in Mail.app's preferences, click the drop-down list under Outgoing Mail Server (SMTP) and click "Edit server list..."
Then add the server "smtp.me.com" with port 587, SSL on, authentication on, then enter your username/password. Then return to the original "Accounts" tab and begin to create a new account by clicking the "+" sign. Type in the required fields such as your e-mail address, and continue to enter "mail.mac.com" as the incoming mail server. For the outgoing mail server, however, select the one you created previously, smtp.me.com. It may still take a while when trying to connect to smtp.me.com, but it worked this way for me eventually.