If you are getting an error right now from mg5.real.mail.yahoo.com it is related to a current service issue with Yahoo Mail:
http://www.emailquestions.com/yahoo-mail/8830-yahoo-mail-connection-refused-connection-failed.html
http://www.emailquestions.com/yahoo-mail/8830-yahoo-mail-connection-refused-connection-failed.html