Download the PHP package cracksalad/phpmailer-pgp without Composer
On this page you can find all versions of the php package cracksalad/phpmailer-pgp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cracksalad/phpmailer-pgp
More information about cracksalad/phpmailer-pgp
Files in cracksalad/phpmailer-pgp
Package phpmailer-pgp
Short Description PHPMailerPGP enables PHPMailer to send OpenPGP/GPG encrypted and signed e-mails
License LGPL-2.1-only
Informations about the package phpmailer-pgp
PHPMailerPGP - A full-featured email creation and transfer class for PHP with support for PGP/GPG email signing and encryption.
This project is based on ravisorg/PHPMailer and replaced PHPMailer inside the repository with PHPMailer as a dependency. It also adds Composer support and includes minor changes to the code itself.
See the main PHPMailer page for all the features PHPMailer supports. This page will document only the PGP additions.
Class Features
- Uses the PHP GnuPG extension for encryption / signing
- Encrypt and/or sign outgoing emails with PGP to one or multiple recipients (signs first, then encrypts when both are enabled)
- Automatically selects the proper keys based on sender / recipients (or manually specify them)
- Use keys in the GPG keychain or from a specified file
- Supports file attachments (and encrypts/signs them)
- Builds PGP/MIME emails so that attachments are encrypted (and signed) as well as the email bodies
- Supports optional Memory Hole protected email headers (for verified/encrypted subjects, and verified from, to, and cc recipients)
- Uses standard PHPMailer functions so that, in theory, any email you can create with PHPMailer can be encrypted/signed with PHPMailerPGP
- Adheres to PHPMailer's coding standards
- (Mostly) built generically so that other encryption systems (S/MIME) could use the same syntax in their classes
Why you might need it
In an ideal world, users would provide you with their PGP keys and you could use this to send secure emails to them. More realistically: because your server sends emails with lots of sensitive information in them, and you should be encrypting them.
License
This software is distributed under the LGPL 2.1 license. Please read LICENSE for information on the software availability and distribution.
Installation
Add this package to your composer.json like this:
Dependencies
- gnupg/gnupg2
- PHP's PECL extension for gnupg
- PHP 5.5+
A Simple Example
Set up your PHPMailer like you would normally:
...but then before sending, specify a file with the keys you want to use (optional) and the encryption / signing options you want to use:
...and then continue normal PHPMailer operation: