This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to retrieve an attached message from a message.  RSS feed

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I want to develop a report where I have to show status of bounced mails.

When I get notification from the server that mail is bounced, its having an attachment of the original message.

I want to check some values from the attached message.

Please tell how to retrieve a attached message from the bounced message.


Please do reply.......


 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A multi-part Message's getContent() method returns a MultiPart object. Once you have this, iterate over the body parts (using getCount(int) and getBodyPart(int)). Check the result of getContent() for each of those. You should check if it is either an InputStream (which means it is a file), a Message (included message) or MultiPart (which means you have to check that one as well).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!