[Yanel-dev] Using S/MIME [WAS: Re: Sending encrypted emails using OpenPGP

Michael Wechner michael.wechner at wyona.com
Tue Feb 4 09:38:16 CET 2014


Hi

We have enhanced Yanel, such that one can send encrypted emails using
S/MIME as well

recipient.setSMIMECertificate(smimeCertificateString);

whereas smimeCertificateString is something like

-----BEGIN CERTIFICATE-----
MIIFMzC.....
....Fo6yzdtU0lTsCVGDcp
-----END CERTIFICATE-----

Thanks

Michael

Am 31.01.14 15:52, schrieb Michael Wechner:
> Hi
>
> We have enhanced Yanel, such that one can send encrypted emails using
> OpenPGP:
>
> import org.wyona.yanel.core.util.Recipient;
>
> Recipient recipient = new Recipient(toEmail);
> recipient.setPGPPublicKey(pgpPublicKeyString);
>
> whereas pgpPublicKeyString is something like
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
> Comment: GPGTools - https://gpgtools.org
>
> mQENBFKA6HkBCADpsp+I........
> ......
> NR+INtInp0nEssXtOaXA/PBIHp3wb2BiqhetINanGIG+pJpFhLDFuA0O+xFSc2Dg
> ne12XDY=
> =jxDH
> -----END PGP PUBLIC KEY BLOCK-----
>
> and then one can send it with
>
> MailUtil.send(fromEmail, null, recipient, subject, body);
>
> and then the MailUtil will encrypt the message accordingly.
>
> Thanks
>
> Michael



More information about the Yanel-development mailing list