$attach = $Form{'fileattach'}; sub send_mail { if ($form_letter ne "") { push (@files,$form_letter); } foreach $file (@files) { if (-e "$filebase/$file") { open(MAIL,"|$mailprog -t"); print MAIL "To: $email ($realname)\n"; print MAIL "From: $fromaddr ($fromname)\n"; if ($organization) { print MAIL "Organization: $organization\n"; } else { print MAIL "Organization: Auto sent file\n"; } print MAIL "Subject: Ab-Hof-Verkaufs-Preisliste\n"; print MAIL "X-Courtesy-Of: SendIt! 1.0\n\n"; open(INPUT,"$filebase/$file")||&error; while () { chop $_; print MAIL $_,"\n"; } close (INPUT); if($attach ne "") { hier hab ichs versucht, ohne erfolg } close (MAIL); }