I've made the changes you told me and it works fine from home, thanks. Now the reason i wrote this script was so that i can check my pop3 emails from work since they block access to yahoo, hotmail, and any other pop3 emails out there. I'm sitting behind a firewall and i think that's what's preventing me from connecting from work. It say's "Unable to establish a POP3 connection to pop.mail.yahoo.com." If you guys know a way around this maybe by connecting through a proxy or something let me know. That will be very helpful and greatly appreciated.