I want to sign and encrypt my mail.
My current camel version is 2.13.0.
Is there a camel feature which I can use for this purpose?
Body is plain text therefore XMLDSig or so cannot be used.
Expected result should be a mail with these headers:
I solved the problem for sending.
I created a new MimeMessage with all required parameters like from, recipient, subject and content (Multipart with body and attachments).
With BouncyCastle I signed and encrypted this MimeMessage.
I set the resulting MimeMessage as body and sent it with standard camel mail endpoint. All required parameters will be selected from the MimeMessage itself and not from the exchange headers.
For receiving I will use also the camel mail standard but with the parameter mapMailMessage=false that I can process the received javax.mail.Message itself without preprocessing. For decrypting I will also use BouncyCastle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With