When I use the "or die" line you suggested, I still get the identical return code that I posted, followed by the "cannot connect to xxx.xx.xxx.xxx. at c:\Email.pl line 37." So the $@ didn't give me any useful information,either. I appreciate the suggestion, though!