Dana 30.01.01, Paul Popour napisa:

> > > But, what to do if there are more file-upload fields???
> > > Simple solution is to repeat above algorhythm for every file. No so
> > > elegant... Is there a better way to accomplish the same thing????

> I believe the proper format for multi-file attachments in Mail::Sender is
> $output = "$file1, $file2, $file3";
>  ref ($sender = new Mail::Sender({from => $from,
>  smtp => $smtp})) or die "$Mail::Sender::Error\n";
>  (ref ($sender->MailFile({to =>$recipients, subject => $subject,  msg =>
> $msg,  file => $output }))
>    and print "Mail sent OK.\n") or die "$Mail::Sender::Error\n";
>  }


OK, I know that. But the problem is (once more):
CGI passes file-handle to file that is uploaded (and I expect it isn't on
the systems' file-system. Mail::Sender expects filename. How to connect
these two?? Option is to create tempfile, flush from the filehandle to
tempfile and finally add that file to message. Then, repeat this for every
file. (message than has mult attachments). But, I want to skip 'flush from
filehandle to tempfile' and pass FH directly to Mail::Sender::SendFile.

BTW, is there some module for creating temp files. (something like mk_temp
in linux)???
-- 
... Vriste mala deca na haubi moga keca.

         - --- -- ---=- --==---===-[Nikola Knezevic]---===--------+
+- -=- -==--=- -=-- --- -- - http://users.hemo.net/indy --- -- -


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

Reply via email to