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

[MacPerl-WebCGI] Net::SMTP



Hi!

I am getting this error when testing out the email script example in the
book: MacPerl: Power and Ease:

# Can't locate Net/SMTP.pm in @INC.
File 'eMaster:Web Pages:MacPerl:emailtest.acgi'; Line 4
# BEGIN failed--compilation aborted.

My script is exactly like the one in the book on page 242-243.  Any
suggestions to what might be the problem?

Here is the script I am testing:
#!perl
use strict;
use Net::SMTP;
use Mac::InternetConfig;
my($smtp, $email, @emails, $subject, $message);
$smtp= Net::SMTP->new();
$email= $InternetConfig{kICEmail()}; # my address
@emails= 'friend@some.host.com';
$subject = "Subject: My test message\n\n";
$message = <<EOM;
MacPerl sent this message. Nifty, eh?
EOM 
$smtp->mail($email)or warn('failure');
$smtp->to(@emails)or warn('failure');
$smtp->data()or warn('failure');
$smtp->datasend($subject) or warn('failure');
$smtp->datasend($message) or warn('failure');
$smtp->dataend()or warn('failure');
$smtp->quit()or warn('failure');

Thanks for help,

Bradley
creamer@students.sonoma.edu



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