At 12:24 AM +0000 11/25/99, Rory C-L wrote: >Hi >I'm trying to send an attachment through the mail > >I'm trying: > >#!perl -w > >use MIME::Lite; >MIME::Lite->send('smtp', "mail.easynet.co.uk", Timeout=>200); > > $msg = new MIME::Lite > From =>'campbell-lange@easynet.co.uk', > #To =>'a@b.c', > To =>'workshop@tesco.net', > #Cc =>'some@other.com, some@more.com', > Subject =>'A message with 2 parts...', > Type =>'TEXT', > Data =>"Here's the GIF file you wanted"; > > attach $msg > Type =>'image/gif', > Path =>'Workshop HD:Desktop Folder:imacwebring.gif', Encoding => 'base64', > Filename =>'clss01.gif'; > >$msg->send; When I tried this (with appropriate changes), I ran into immediate problems because the encoding isn't specified. Most mailservers won't handle arbitrary binary data very well. Once I specified the encoding, it worked fine. The second thing you should check, since you ran out of memory, is to make sure you're giving MacPerl an adequate memory partition. The size it ships with is not enough for serious module usage. You should make sure you're giving it at least 8 Mb. > > >the gif is 8k! >Errors: > ># Ambiguous use of {index} resolved to {"index"}. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:InternetConfig.pm'; Line 501 ># Ambiguous use of {index} resolved to {"index"}. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:InternetConfig.pm'; Line 503 ># Ambiguous use of {index} resolved to {"index"}. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:InternetConfig.pm'; Line 509 ># Use of uninitialized value. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:Types.pm'; Line 68 ># Use of uninitialized value. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:Types.pm'; Line 68 ># Use of uninitialized value. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:Types.pm'; Line 56 ># Use of uninitialized value. >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Mac:Types.pm'; Line 56 ># Deep recursion on subroutine "Net::Cmd::response". >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Net:SMTP.pm'; Line 337 ># Deep recursion on subroutine "Net::Cmd::getline". >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Net:Cmd.pm'; Line 277 ># Deep recursion on subroutine "Net::SMTP::close". >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Net:Cmd.pm'; Line 224 ># Deep recursion on subroutine "Net::SMTP::_QUIT". >File 'Workshop HD:Rory:Rory's applications:programming:MacPerl >Ÿ:lib:Net:SMTP.pm'; Line 315 >Out of memory! >Out of memory! >Out of memory! > >-- > Rory Campbell-Lange + The Campbell-Lange Workshop > London > > > > >==== Want to unsubscribe from this list? >==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org -- Paul Schinder schinder@pobox.com ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org