MIME::Lite install and syntax errors-Help!

[email protected] (Mark Wheeler) Tue, 10 Sep 2002 22:31:13 -0700
Newsgroups perl.macperl.webcgi
Message-ID <B9A42331.12A3%[email protected]>
Hi,

This is my first post and have a quick question. I am trying to add
MIME::Lite to my MIME folder in my Lib forlder. but I can't seem to extract
the latest version of MIME::Lite. It is a tar.gz file. Unstuffit expands th=
e
..gz part, but can't do anything with the tar part.

I d/l MacTar, and that didn't help either. It came up with an error. I
checked the file size and it said it was 0K. I am thoroughly confused.

I want to add this module to my library. I am presuming that all I need to
do is d/l it from ZeeGee or CPAN, expand/extract the file and drop it into
the MIME folder. Is that correct?

I did d/l BizMail, and it uses and includes MIME::Lite. So I took
MIME::Lite.pm from that file and dropped it into the MIME folder in my Lib
forlder.

I them ran the following script:


use MIME::Lite;

my $from_address =3D '[email protected]';
my $to_address =3D '[email protected]';
my $subject =3D 'MIME::LITE SMTP test';
my $mime_type =3D 'TEXT';
my $message =3D "Hello world!\n";

# Create the initial text of the message
my $mime_msg =3D MIME::Lite->new(
   From =3D> $from_address,
   To   =3D> $to_address,
   Subject =3D> $subject,
   Type =3D> $mime_type,
   Data =3D> $message
   )
  or die "Error creating MIME body: $!\n";


# Set this variable to your smtp server name
my $ServerName =3D "mail.pacbell.net";

# Let MIME::Lite handle the Net::SMTP details
MIME::Lite->send('smtp', $ServerName);
$mime_msg->send() or die "Error sending message: $!\n";

and when I checked the syntax in MacPerl, I got the following error:

# syntax error, near ";


=3D"
File 'Macintosh HD:Applications (Mac OS 9):MacPerl =9F:lib:MIME:Lite.pm'; Lin=
e
1
# Compilation failed in require.
File 'Macintosh HD:Desktop Folder:Sending Mail scripts:Sending mail w/ MIME
only'; Line 2
# BEGIN failed--compilation aborted.
File 'Macintosh HD:Desktop Folder:Sending Mail scripts:Sending mail w/ MIME
only'; Line 2


Something is not right here. I'm fairly certain the script is fine, I think
it has something to do with MIME:Lite, or the the installation of Lite.pm.

Any help would be greatly appreciated. This is one of the last pieces to a
large project, and I am ready to have it completed.

Thanks,

Mark Wheeler=20