[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] A problem with mail



Hello all,

I've just tried to install Graham Barr's "MailTools-1.1002" from the 
MacPerl CD-ROM. I dropped the "Mail" folder into my "site_perl" 
folder. "Mail" contains both "Header.pm" and "Internet.pm".

However I haven't been able to send any mail. Every time I try I get 
the error message
   # Can't locate auto/Mail/Internet/smtpsend.al in @INC.
   File 'IntHD:Languages:MacPerl Ÿ:lib:AutoLoader.pm'; Line 38
   ( Line 38 is:   eval {require $name}; )

What is the problem? I can't figure it out. Does anyone have any ideas?

I'm attaching the script I was trying to execute below. It is 
modelled on a script from "How do I send/read mail?" in 
"perlfaq9.pod".

Thanks for your help.

Regards,

Vic

---------------------- my script follows -------------------------
use Mail::Internet;
use Mail::Header;
$ENV{SMTPHOSTS} = 'mail.dacor.net';

my ($header, $body, $mail);

# create headers
$header = new Mail::Header;
$header->add('To', 'Vic Norton <norton@bgnet.bgsu.edu>');
$header->add('From', 'Vic Norton <norton@tweney.com>');
$header->add('Subject', 'Mail::Test');
$header->add(undef, 'X-Norton-URL: <http://www.tweney.com/norton/>');

# create body
$body = 'This is a test, ignore';

# create mail object
$mail = new Mail::Internet(undef, Header => $header, Body => \[$body]);

# send it
$mail->smtpsend or die;  # this is where the problem is

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org