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

I have installed PERL 561 with the following packages:

- DBD-ODBC
- DBI
- Mail-Sender
This installation was performed in two machines:

A - Windows 2000 Server
B - Windows 2000 Pro
I have a PERL program that makes a connection with the SMTP called SVRSMTP and sends an email to a user called USU1.
The program was executed in the machine A and the email is successfully sent
The program was executed in the machine B and it is not able to send the email. The following message is sent by the variable $Mail::Sender::Error
- connect() failed
Can anyone send me a suggestion of is happenning?
Thank you very much!
use Mail::Sender; $To = $ARGV[0]; # Here is passed a valid email-address $From = $ARGV[1]; # Here is passed a valid email-address $Server = $ARGV[2]; # Here is passed a server ip address that d +oesnt need login authentification $Subject = $ARGV[3]; # Passed a string "subject test" $Body = $ARGV[4]; # Passed a string "body test" $Attach = $ARGV[5]; # Here receive a c:\temp\testatt.txt and th +is file exists $Cc = ""; $sender = new Mail::Sender { smtp => $Server, from => $From}; $sender->MailFile({ to => $To, subject => $Subject, msg => $Body, file => $Attach}); $sender->Close;

Replies are listed 'Best First'.
Re: Windows 2000 PRO can't send email using Mail-Sender
by ww (Archbishop) on Apr 01, 2005 at 21:38 UTC
    ... not without more information.

    what does the program look like?
    Please post the script, INSIDE <code>...</code> tags as an UPDATE to your original query...
    ( see Writeup Formatting Tips )
    ... and then you're apt to receive some monkly wisdom!

      Done!
        nice cleanup (for which, thanks) but I'm still having a hard time getting a grip on your question. Please clarify "The program was executed in the machine B and it is not able to send the email.".

        Do you mean that you are trying to execute the same script on both Machine A and Machine B to send to a third machine (where USU1 exists)? or that "B" fails to execute Mail::Sender to reply to A or ???

        or (perhaps an issue) are you sure the w2k Pro machine (B) has smtp server. I suspect that's stock in the w2k Server machine, but suspect it is not installed on w2k Pro. M$ didn't distinguish the two solely to bump up its product count - ie, is there an SMTP server on B?

        If you're trying to have "B" talk to "A" when you get the error, do you have an IP issue? Documentation says

        smtp => the IP or domain address of your SMTP (mail) server This is the name of your LOCAL mail server, do NOT try to contact +directly the adressee's mailserver! That would be slow and buggy, you +r script should only pass the messages to the nearest mail server and + leave the rest to it. ...

        I'm not even sure I'm asking you for the right info, but since I see no other attempts to respond, I suspect others are having difficulty parsing your problem, too.

        UPDATE: bang-one, in CB, suggests: "...have him confirm that he can connect to the other server. A simple "telnet ip 25" should tell him whether or not it's a factor outside of the code.
        <!1> Which I suspect it is, considering the script works on another machine.