Hi!

I'm tying to attach an image file to an email and it seems I'm close, can I
have any help to see why the image passed to the email is unusable? It's
lenght seems to be ok, and everything looks ok but the image cannot be
openned.

open(MAIL,"|$mailprog -t");
print MAIL <<Content;
To: $to
From: $from
Subject: thisfile.$ext
Content
print MAIL "Content-Type: $CGI{'file'}->{'Content-Type'}\n";
print MAIL "Content-Disposition: attachment; filename=\"thisfile.$ext\n";
print MAIL "Content-Length: ".length($CGI{'file'}->{'Contents'})."\n";
print MAIL "Content-Transfer-Encoding: binary\n\n";
print MAIL "$CGI{'file'}->{'Contents'}";
close (MAIL);

Where $ext is parsed from the file selected in the form.

I think maybe I'm missing some line.

If someone can help here, I would really apreciate it.

Thanks,
Mauricio

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to