Hi I'm having trouble connecting the dots for FormFile upload and
 sending
 an email attachment with a FormFile. Can someone give me an example?
 I'm basing my code on this (using Java Mail API):
 
 // Part two is attachment
 messageBodyPart = new MimeBodyPart();
 DataSource source = new FileDataSource(filename);
 messageBodyPart.setDataHandler(new DataHandler(source));
 messageBodyPart.setFileName(filename);
 multipart.addBodyPart(messageBodyPart);
 
 I can't find an easy way to conver from a FormFile to this
 FileDataSource. I don't want to create a temporary file on disk if I can
 avoid it, but it's okay if no other option. Please advice.
 
 thank you.
 M.
 -- 
   Melanie Tanaka
   [EMAIL PROTECTED]
 
-- 
  Melanie Tanaka
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Send your email first class

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to