File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending a X509Certificate with JavaMail attachment

 
Sverre Moe
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a java.security.cert.X509Certificate object that I want to send via e-mail.
How do I wrap this object in an e-mail attachment?

Would this work:


Most examples I have seen uses the following attachment method, but I do not have a regular file.



I found that Spring offers some JavaMail implementations:
Using Spring I have devised the following two solutions:

Using MimeMessagePreparator


Using MimeMessageHelper and ByteArrayResource:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic