Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail

 
Dave Hewy
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of a utility class out there that just takes an object of type Message (or similar) and returns an object representing the email including the attachments etc?

Maybe it can do the opposite as well?

Seems like loads of people are writing code that is almost identical !

Dave
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps I am missunderstanding something, but a Message is an object representing the email. Perhaps you can explain what you are trying to do?
 
Dave Hewy
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah - sorry, not made myself too clear.

You're right that it's a representation of an email, but you have to put a bit of work in to get all the bits out if you have file attachments, embedded attachments, pictures, embedded emails etc.

What would be good is an email object where all this has been done, so it may have methods that return a collection of all attachments for example, as byte arrays or similar.

Now I've had time to mess around with the classes, it's not that bad to have to do this yourself, but do you get what I mean?

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic