Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Fedora. I send Emails by using sendEmail. but I got an error:

ERROR => Connection attempt to localhost:25 failed: IO::Socket::INET: connect: Connection refused

share|improve this question

migrated from Jan 12 '10 at 11:33

This question came from our site for professional and enthusiast programmers.

I think this question is better off at superuser, not here :/ – Anthony Forloney Jan 12 '10 at 7:16
Well, it sounds like a Perl question. – Greg Hewgill Jan 12 '10 at 7:17

Your program is trying to relay email via an SMTP server on the same machine but the SMTP server. WHen the program attempts to open the connection, that connection fails.

Most likely, you don't have an SMTP server running on that machine. You can try to install an email server or you can see if your program allows you to specify a 'relay host'. In the later case, you will need to give it the IP or hostname of a machine that has an SMTP server and is willing to exchange email for you.

There is another less likely possibility that there is an SMTP server on your machine but it is not configured to use the loopback address. From my previous suggestion, you will need to find out how to specify the relay host but instead of using the loopback (i.e. localhost or, you'll need to specify the actual IP of your machine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.