Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

attach emails in JSP

 
m brymer
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I need to be able to allow the end user to attach emails from Outlook to a record when they are editing or adding it. I am not sure how to get started on this any suggestions for documentation or sample code? Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, Outlook is a client side program - so your users will first have to save the email to a known location, then upload it through a servlet to your server. Then you can attach the file to an email you generate and send with the JavaMail API.

That all sounds a little clumsy though. The easiest way to do it would be to have user cut-and-paste the contents of the email into a textarea in a form and send this with the request to your servlet. If you wanted to drag and drop an email into a form, I've no idea if this is possible, but if it were it would probably need some sort of ActiveX control.

Any of this any use?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic