Hi All,

I need some help with MIME::Lite on Windows.

I'm running ActivePerl 5.8.8 Build 817 on all my Windows boxes & I just
finished installing the MIME-Lite-3.01 from the Active State PPM
repository, along with all the pre-requisite modules.

I'm attempting to port a perl program from AIX Unix where this program
works down to Windows where it breaks.

I only have a requirement to send out emails, not to receive any emails.

The program uses "use strict;" & "use warnings" so I'm assuming I didn't
get something configured correctly on Windows.

Can someone give me a hint or two to check out?

Here's the relevant code from my program:

eval
{
   my %mail_args =  ( From     => $from,
                      To       => $mail_list,
                      Subject  => $subject,
                      Type     => 'TEXT',
                      Data     => $mail_body ) ;
   my $msg = MIME::Lite->new( %mail_args  );
   $msg->send ('smtp');
};
if ($@)
{
   print STDERR "Failure sending email: [EMAIL PROTECTED]";
}

The call to $msg->send ('smtp') is throwing the following exception:
Failure sending email:  Failed to connect to mail server: Bad file
descriptor  at notify.pl line 478.

If I used the call I use for AIX unix, $msg->send ('smtp', 'localhost',
Dbug=>0);
I get the following message:
Failure sending email:  Failed to connect to mail server: Unknown error
at notify.pl line 478.

If I try just $msg->send (), I just get a message that it can't find the
sendmail program and no exception is thrown.  And no email is sent out.

So I'm assuming that it's because it can't locate the mail server to use
on the Windows platform.

Is there any way to ask Windows what mail servers are available?  I'd
hate to have to hard code one that isn't available at all the locations
this program would be installed on.  I'd rather add code to ask for it.

Curtis



_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to