by CiPHPerCoder · 10y ago · 0 comments
It uses zend-mail from Zend Framework and Crypt_GPG.
All you need to do is:
$gpgMailer = new GPGMailer(
new Sendmail(), // Or any other transport
['homedir' => '/homedir/containing/keyring']
);
$gpgMailer->send(
$message, // Message object from Zend\Mail
$fingerprintOrPublicKey
);
Simple as can be. (There are other steps for, e.g. importing keys in the first place, but that's neither here nor there.)The license is dual GPL/MIT, so feel free to use it in pretty much anything. It was a minor itch to scratch.
We're using it to optionally encrypt password reset emails in a CMS we're developing:
https://twitter.com/CiPHPerCoder/status/739536854517702660
The password reset feature can be entirely opted out of, too:
No comments yet.