In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Paul D. Price) wrote:
> Friends,
>
> I am trying to send email in Perl using the Net::SMTP module, with the
> script below, taken from the MacPerl book. I am getting sluugish
> performance (PB G3 250 attached to cablemodem thru an xrouter) and out of
> memory messages every time this script runs, and I have set my memory
> partition to 70MB! Any suggestions?
>
> Thanks,
> Paul
Net::SMTP doesn't produce rfc-822-compliant headers.
do an
i /MailTools/
in the CPAN shell
and try the Mail::Mailer module instead
my $server = 'server.address.here.com';
my $mailer = new Mail::Mailer 'smtp', Server => $server;
my %header = (
'From' => '[EMAIL PROTECTED]',
'To' => '[EMAIL PROTECTED]',
'Subject' => 'etc etc etc',
);
my $body = <<"EOB";
Insert body text here with $variables if necessary;
EOB
# bang.. zoom! To the moon, Alice!
$mailer->open(\%headers);
print $mailer $body;
$mailer->close;
HTH!
--
Scott R. Godin | e-mail : [EMAIL PROTECTED]
Laughing Dragon Services | web : http://www.webdragon.net/