Hello friends,

I'm trying to get Mark Overmeer's Mail::Internet module to work on my system.

Problem: I can't send mail using Mail::Internet's smtpsend method.

Details: This is a Red Hat Linux box connecting to the internet over plain old dial-up PPP. I am using my ISP's SMTP server. I know my connectivity is OK, because

(1) I can telnet into my ISP's SMTP server and send myself an email that way, using HELO, MAIL From, RCPT to, DATA, etc.

(2) Net::SMTP works. I wrote a small script using it, and I can send myself email through my ISP until I go blind, if I want to. This is puzzling, because according to the documentation, Mail::Internet uses Net::SMTP. Anyway, I have verified that Net::SMTP works on my system.

(3) I have verified that the test emails I send are not being trapped by my ISPs spam filter.

I've used Mail::Internet frequently in the past, but always on machines running a local mail server (sendmail).

The following script, when executed, appears to do nothing at all; no mail gets sent. I cribbed it straight from Lincoln Stein's book and just changed the names and addresses. (Mercifully, it's short.)


#!/usr/bin/perl -w
use Mail::Internet;


my $body = <<'END';
Trying to use Mail-Internet again. I wonder what is wrong?
END


print "$body\n";


$ENV{SMTPHOSTS}='smtp.dca.net';


my $header = Mail::Header->new;
$header->add(From    => '[EMAIL PROTECTED]');
$header->add(To      => '[EMAIL PROTECTED]');
$header->add(Subject => 'Back to Mail-Internet');
my $mail = Mail::Internet->new(Header => $header,
                              Body   => [$body],
                              Modify => 1);
print $mail->smtpsend();


Any advice would be deeply appreciated. Thanks!



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to