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
This question came from our site for professional and enthusiast programmers.
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.