Sendmail & File attachments

Can anyone tell me how to use sendmail and file attachments together?

Thanks

CDitty


Hello,

You can send file attatchments in perl using the sendmail by doing this:

#!/usr/bin/perl
print "Content-type:text/html

";
print “message is being sent.”;
open (MAIL, “|/usr/sbin/sendmail -t”);
print MAIL "To: email@domain.com
";
print MAIL "From: email2@domain2.com
";
print MAIL "Subject: subject

";
print MAIL “message goes here”;
print MAIL "

";
$attachment = ‘file.zip’;
open(FILE, “uuencode $attachment $attachment|”);
while( <FILE> ) { print MAIL; };
close(FILE);
close(MAIL);

I hope this helps you.

-Jason Weinstein