posted 11 years ago
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: