good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Can't get Net::SMTP to workby kcantrel (Initiate) |
on May 09, 2013 at 21:34 UTC ( [id://1032850]=perlquestion: print w/replies, xml ) | Need Help?? |
kcantrel has asked for the wisdom of the Perl Monks concerning the following question:
Environment: O/S: Windows 7 64 bit Perl: ActivePerl 5.16.3 Problem: I can't seem to get Net::SMTP to work. It fails to even attempt to connect to the mail server. I confirmed that by using 'wireshark' and noticed that no packets are leaving my computer. Here is the very basic code I am trying to use:
In the above code the call to Net::SMTP->New() always returns "undef". You can see where I tried "Net::FTP" and that one works just fine, so the underlying network routines seem to work. I also confirmed I can telnet to port 25 of the mail server, and I get the typical "welcome" response. I've tried various options and ways of calling SMTP->new but they all result in the same problem. Any ideas will be greatly appreciated. A slight update, I just added "($!; $@)" to the die line above and it printed:Failed to connect to cube (No connection could be made because the target machine actively refused it.; Net::SMTP: connect: No connection could be made because the target machine actively refused it.) Keep in mind that I saw NO network activity with Wireshark and 'telnet' is able to connect to port 25. Oh, and I have disabled the Windows Firewall. So, in my option the error message is misleading at best.
Back to
Seekers of Perl Wisdom
|
|