perlquestion
kidd
Hello...<p>
Can someone tell me why doesnt this work...
<p>
<code>
my $msg = MIME::Lite->new(
From =>$Input{'email'},
To =>$Input{'sender'},
Subject =>'New message',
Type =>'multipart/mixed'
);
$msg->attach(Type =>'TEXT',
Data =>"$Input{'message'}"
);
open(FILE, "attach.txt");
my @lines = <FILE>;
close(FILE);
foreach my $line(@lines){
$msg->attach(Type =>'image/gif',
Path =>"/u619/be/bon/uploads/$line",
Filename =>"$line",
Disposition => 'attachment'
);
}
$msg->send;
print "Content-type: text/html\n\n";
print "<h1>MAIL SENT</h1>";
</code>
<p>
What I have in my "attach.txt" text are the file names of pictures...the two of them in .jpg...
<p>
I know it's not a problem with the location of the library, and it isnt the sendmail path...
<p>
It would be great if you could tell me what Im doing wrong...
<p>
THANKS