in reply to Re: Re: Re: Using MIME-Lite to send attachment
in thread Using MIME-Lite to send attachment
Another quick question. I think I've got the code about right, but now I'm getting the error message below. Any ideas?
Again, here is my code:C:\A\backup\scripts>mail_attach2.pl Bareword found where operator expected at C:\A\backup\scripts\mail_attach2.pl line 19, near "Filename =>'butterf +ly" (Might be a runaway multi-line '' string starting on line 18) (Do you need to predeclare Filename?) syntax error at C:\A\backup\scripts\mail_attach2.pl line 19, near "Fil +ename =>'butterfly" Bad name after ani' at C:\A\backup\scripts\mail_attach2.pl line 19.
Thanks for all your help!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 =>'animated cursor', Path =>'C:\a\cursors\', Filename =>'butterfly.ani' ); if ($I_DONT_HAVE_SENDMAIL) { MIME::Lite->send('smtp', "smtp.mailrelay.usps.gov", Timeout=>60) +; } $msg->send; ### will now use Net::SMTP as shown above #$text = $msg->as_string;
Rob
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Using MIME-Lite to send attachment
by tachyon (Chancellor) on Apr 10, 2004 at 13:27 UTC | |
by rscott212 (Sexton) on Apr 13, 2004 at 01:59 UTC | |
by tachyon (Chancellor) on Apr 13, 2004 at 02:14 UTC | |
by tachyon (Chancellor) on Apr 13, 2004 at 03:16 UTC |