Hi,
I need some help.
I am trying to accomplish the probably relatively simple task of making a
MacPerl script send an email with an attachment. The attachment will always
be a .pdf file in this particular script.
I am using Net::SMTP to send the actual email message. I searched and
could find no documentation on using Net::SMTP to send an attachment. Is
this possible?
Finally I found an example of using MIME::Entity to send the attachment.
The code looks relatively simple. Then I started running into more
problems.
I don't have MIME::Entity. So I tried downloading it from CPAN. After quit
a bit of frustration I finally found cpan-mac-0.40 which promised to
convert the files so my Mac can read it, and install it for me.
I have tried a number of different versions of MIME from CPAN:
MIME-tools-5.304, MIME-tools-5.209, MIME-tools-4.124, and
MIME-Lite-2.101.
I believe MIME::Lite actually installed itself correctly, but I am not
sure how to use it to send attachments. Is this possible?
The others keep producing errors such as this when I try to use
cpan-mac-0.40 to install them:
Warning: checksum mismatch, b66, 406a
# Use of uninitialized value.
File 'Rocketship:MacPerl :lib:IO:File.pm'; Line 181
# Unable to open the data fork of :MIME-tools-4.124:testin:(bunch of
messed up characters).
File 'Rocketship:MacPerl :site_perl:ExtUtils:MM_MacOS.pm'; Line 1026
After looking up this error on the mailing list archives, I found a
message from Chris Nandor saying to unpack it with Stuffit Expander. So I
did, it unpacked just fine, and then I dragged the resulting folder to
"installme" and got:
Checking if your kit is complete...
Looks good
# Illegal character \012 (carriage return), <FH> chunk 1.
File '(eval 21)'; Line 1
# Can't do :Makefile.PL in Rocketship:Desktop Folder:Perl
tools:MIME-tools-5.209.1
# No Rocketship:Desktop Folder:Perl tools:MIME-tools-5.209.1 package data.
File 'Rocketship:MacPerl :site_perl:ExtUtils:MM_MacOS.pm'; Line 910
So my questions are:
1) Is there a way besides MIME::Entity to attach a file to an email
message?
2) If not, how do I get it installed on my Mac?
Thanks :)
Frances Schuetz