1

I have a struts-action, and when that action is called i would like to create and return a simple eml or msg file that can be opened in outlook.

This is can do just fine with a basic email-message. I just saved an email as eml from outlook and studied its content. Then created a string in my action and returned it as a stream with the correct content-type and extension.

But when i would like to add an attachement to the message i guess i would need some help. Is there any free api's out there that can help me construct a well-formed eml/msg file with an attachment?

user829237
  • 1,719
  • 8
  • 37
  • 61
  • Did you happen to notice [this question](http://stackoverflow.com/questions/421944/creation-of-a-eml-file-with-an-attachment-using-javamail) while searching? – Tim Post Aug 17 '11 at 07:18

1 Answers1

1

Never mind. I found the solution myself.

Java Mail API is the way to go! It was so simple i cant belive i even considered buying a 3rd party exte

user829237
  • 1,719
  • 8
  • 37
  • 61
  • 1
    could you share your solution with me :-) ? I need *.msg files or *.eml files that are open-able by outlook 2010... thanks in advance. – salocinx Feb 26 '13 at 13:12