What do I do when I get "connection refused" when sending mail?

0

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

raja

Posted 2010-01-12T07:13:36.560

Reputation:

I think this question is better off at superuser, not here :/ – Anthony Forloney – 2010-01-12T07:16:05.697

2Well, it sounds like a Perl question. – Greg Hewgill – 2010-01-12T07:17:40.080

Answers

3

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 127.0.0.1), you'll need to specify the actual IP of your machine.

R Samuel Klatchko

Posted 2010-01-12T07:13:36.560

Reputation: 416