
kidd
User
Jul 15, 2002, 1:12 PM
Post #1 of 3
(209 views)
|
|
Using MIME::Lite
|
Can't Post
|
|
Hello... Can someone tell me why doesnt this work...
my $msg = MIME::Lite->new( From =>$Input{'email'}, To =>$Input{'sender'}, Subject =>'Envío por el anuncio', Type =>'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach(Type =>'TEXT', Data =>"$Input{'message'}" ); open(FILE, "attach.txt"); my @lines = <FILE>; close(FILE); foreach my $line(@lines){ my $path = "/u19/ben/boon/uploads/$line"; $msg->attach(Type =>'image/gif', Path =>$path, Filename =>$line, Disposition => 'attachment' ); } $msg->send; print "Content-type: text/html\n\n"; print "<h1>DONE</h1>"; What I have in my "attach.txt" text are the file names of pictures...the two of them in .jpg... I know it's not a problem with the location of the library, and it isnt the sendmail path... It would be great if you could tell me what Im doing wrong... THANKS
"So you want to be a cowboy Well you know it's more than just a ride Guess you got to know the real thing If you want to know the other side Ain't nobody riding shotgun In this world tonight"
|