Skip to content

OpenPGP Signer (and/or encryption) for SwiftMailer using Crypt_GPG

License

Notifications You must be signed in to change notification settings

NightJar/SwiftSigner-CryptGPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP based emails protected via OpenPGP

This library extends the somewhat ubiqitious SwiftMailer package by providing a class to fit the Message Signer API to implement PGP encryption and optionally signing.

Usage

One must have a keyring set up and accessible, as per the requirements of the Crypt_GPG library. This means that PHP must also have permission to shell out commands via proc_open

$encryptionKeyID = '[email protected]';
$signer = new \Nightjar\SwiftSignerCryptGPG($encryptionKeyID);
/** @var Swift_Message $swiftMessage */
$swiftMessage->attachSigner($signer);

Upon sending the message it will be encrypted as per PGP/MIME (RFC 3156)

Limitations and future development

Currently encryption is mandatory, signing is optional. This should change to provide a signing only option in the future.

About

OpenPGP Signer (and/or encryption) for SwiftMailer using Crypt_GPG

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages