• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change object of Message class to object MimeMessage

 
Rohan Baweja
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I dont know if this is possible also or not. I have tried searching for this solution all over the place. I want to convert an object of Message to object of MimeMessage class. Actually I want to use getMessageID() method of the MimeMessage() class on Message() class objects.
Thanks
Rohan
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Message is abstract, so you might already have a
MimeMessage. If you're using only the classes available
from Sun, MimeMessage is the only concrete subclass of
Message.
Try a cast to MimeMessage.
Joe
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!