This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

extracting attachment from lotus notes through java  RSS feed

 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to extract the attachment from the mail with the use of java api.

What I have to achieve is that I have to extract all the mails from Lotus Notes and put them in another database. For that I have to write program to extract mails one by one and also get the data like from, to, subject, attachment from each mail and store them in my database. I am able to get all the fields with the information about the mail but not able to get the embedded attachment from the mail.

Could someone help me out with this.

Regards
Kapil
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you accessing Notes - are you using JavaMail?

It would help if you explained in more detail what "not able to get the embedded attachment from the mail" means. Are there errors or exceptions? Are you missing API calls that deal with attachments?
 
todd runstein
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kapil,

I haven't done a lot of this, but I'm pretty sure that attachments are stored within RichTextItem fields. So, go through each Document, and then each RichTextItem - call getEmbeddedObjects on the RichTextItem and you should have your attachments. Again, I haven't actually done this, so you'll need to really test it out (you may get back embedded objects that are not attachments - OLE objects, links, other crap???).

Good Luck!
 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks todd and ulf for your replies. As you said that attachments are there in richtextfield. I am also able to get from that.

Thanks again
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!