rscott212 has asked for the wisdom of the Perl Monks concerning the following question:
I tried to use the following code to use mime lite module to send an attachement and got the following error! What am I doing wrong? Do I need to move the module into a different directory?
Can't locate MIME/Lite.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) at C:\A\backup\scripts\mail_attach.pl line 2.
Below is my code!
use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'johns@mindspring.com', To =>'peter21458@aol.com', #Cc =>'some@other.com, some@more.com', Subject =>'A test with attachment', Type =>'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach(Type =>'TEXT', Data =>"Here's the file you wanted" ); $msg->attach(Type =>'image/gif', Path =>'C:\a\backup\cursors', Filename =>'butterfly.ani' ); $text = $msg->as_string;
20040403 Edit by castaway: Changed title from 'Using MIM-Lite to send attachment'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using MIME-Lite to send attachment
by tachyon (Chancellor) on Apr 02, 2004 at 16:05 UTC | |
by rscott212 (Sexton) on Apr 02, 2004 at 19:04 UTC | |
by tachyon (Chancellor) on Apr 03, 2004 at 00:05 UTC | |
by rscott212 (Sexton) on Apr 10, 2004 at 11:36 UTC | |
by tachyon (Chancellor) on Apr 10, 2004 at 13:27 UTC | |
| |
by demerphq (Chancellor) on Apr 04, 2004 at 12:57 UTC | |
Re: Using MIME-Lite to send attachment
by esskar (Deacon) on Apr 02, 2004 at 15:52 UTC |
Back to
Seekers of Perl Wisdom