----- Original Message -----
From: "Jeff Zanzinger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 14:17
Subject: SMTP not sending


> I just installed the windows 2000 server and having trouble sending
> email from ActivePerl using Net::SMTP or Mail::Sender.  The perl program
> executes without error but no emails are ever sent out.  Your guidance
> is greatly appreciated!  Below is the perl program.
>
> use Net::SMTP;
>
> $smtp = Net::SMTP->new('dci-4vzc25o9dv7.sales. anywhere.com ');
> $smtp->mail( '[EMAIL PROTECTED]' );
> $smtp->to('webmaster@ anywhere.com ');
> $smtp->data();                      # Start the mail
> # Send the header.
> $smtp->datasend("To: [EMAIL PROTECTED]\n");
> $smtp->datasend("From: [EMAIL PROTECTED]\n");
> $smtp->datasend("\n");
>
> # Send the body.
> $smtp->datasend("Hello, World!\n");
> $smtp->dataend();                   # Finish sending the mail
> $smtp->quit;                        # Close the SMTP connection

Jeff,

First check that your object was created successfully:

$smtp = Net::SMTP->new('dci-4vzc25o9dv7.sales. anywhere.com ');
die("SMTP object constructor call failed $!, stopped") unless (defined
$smtp);

As I recall, there is also a bug in Net::SMTP on Win32 that can be worked
around by:

# Specify the domain-name for SMTP.
$ENV{DOMAIN} = 'your.domain';

Where 'your.domain' is the domain name of the email server.

Hope that this fixes your problems.

Dirk Bremer - Systems Programmer II - ESS/AMS  - NISC St. Peters
USA Central Time Zone
636-922-9158 ext. 8652 fax 636-447-4471

[EMAIL PROTECTED]
www.nisc.cc

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to