mahbubur has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have a script that is trying to connect to gmail email server to retrieve and process some emails. I have installed all the required perl modules but I keep getting the following error. Can someone please shed some light on what might be wrong? "Unable to connect to imap.gmail.com: IO::Socket::SSL: connect: Connection refused at ./email.pl line 81" Thanks
  • Comment on IO::Socket::SSL: connect: Connection refused

Replies are listed 'Best First'.
Re: IO::Socket::SSL: connect: Connection refused
by mikeraz (Friar) on Apr 13, 2012 at 20:22 UTC

    And what is happening at line 81 in email.pl?

    There are many potential reasons for an SSL connection to be refused - ranging from an expired key to connecting to the wrong port to ... too many to list.

    Please help us help you by supplying a snip of your code.


    Be Appropriate && Follow Your Curiosity
      Thanks for your response. I have figured out the the issue. The server that I was running the script was in a data center and they had a firewall in place to prevent outgoing traffic to imap port 993. Once the firewall rule was updated to allow traffic all seem to be working fine.