|Subject:||MIME::Lite and Email::Date::Format|
|Date:||Wed, 15 Dec 2010 22:35:47 +0100|
This script, taken from the MIME::Lite CPAN download site produces the error just below it:
# use lib '/System/Library/Perl/Extras/5.10.0/Date '; <<< Tried this as well.
# Build the message
$message = MIME::Lite->new(
From => 'firstname.lastname@example.org',
To => 'email@example.com',
Subject => "A test",
Type => "text/plain",
Encoding => '7bit',
Data => "Just a test message");
# Tell MIME::Lite to use Net::SMTP instead of sendmail
MIME::Lite->send('smtp', 'localhost', Timeout => 20);
# Send the message
Gives me the following error:
$ perl -w x.pl
Can't locate Email/Date/Format.pm in @INC (@INC contains: /System/Library/Perl/Extras/5.10.0/Date /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at /Library/Perl/5.10.0/MIME/lite.pm line 1092.
What am I doing wrong?
Thanks for your help.
Some details of the installation.
I installed MIME::Lite, 3.0.27.
It warned me that Email::Date::Format was missing.
I installed Email::Date::Format v1.002 (it’s all I can find on CPAN).
The installation procedure put it in /System/Library/Perl/Extras/5.10.0/Date
$ ls /System/Library/Perl/Extras/5.10.0/Date
-rw-r--r-- 1 root wheel 9758 2 Jun 2003 Format.pm
drwxr-xr-x 25 root wheel 850 19 May 2009 Language
-rw-r--r-- 1 root wheel 1343 21 Mar 2001 Language.pm
-rw-r--r-- 1 root wheel 8859 3 Jun 2003 Parse.pm
To be sure I re-installed MIME::Lite and still got the warning:
$ cd MIME-Lite-3.027
$ perl Makefile.PL
MIME::Lite is designed to take advantage of a variety of external modules
if they are not present then MIME::Lite will attempt to do its best
but its strongly recommend that you install them.
These modules are:
Some or all of these maybe included with your perl, neverless if you wish
I can add these modules to the prereq list which will cause the files to be
automatically installed if they arent already present
Add prereqs? [Yes]
Warning: prerequisite Email::Date::Format 1.000 not found.
Warning: prerequisite MIME::Types 1.28 not found.
Writing Makefile for MIME::Lite