aspose file tools*
The moose likes Security and the fly likes Sending a X509Certificate with JavaMail attachment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Sending a X509Certificate with JavaMail attachment" Watch "Sending a X509Certificate with JavaMail attachment" New topic
Author

Sending a X509Certificate with JavaMail attachment

Sverre Moe
Ranch Hand

Joined: Jul 10, 2007
Posts: 110
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
 
subject: Sending a X509Certificate with JavaMail attachment