Location: PHPKode > scripts > pgp_enc.Class > pgp_enc-class/pgp_enc_demo.php3
<?php
/***************************************
** Title.........: PGP Encrypted Mail Class
** Version.......: 1.0
** Author........: James Moore <hide@address.com>
** Filename......: pgp_enc_demo.php3
** Last changed..: 17/04/2000
** Notes.........: Based upon html_mime_mail.class
**                 by Richard Heyes <hide@address.com>
**                 and Tobias Ratschiller <hide@address.com>
**                 and Sascha Schumann <hide@address.com>.
**
***************************************/

include("pgp_enc.class");

$mail = new pgp_encrypted_mail("X-Mailer: PHP\PGP Mailer\n");
$text = "This is a test";
$mail->add_key("Your ID");
$mail->body = $text;
$mail->sign("Your ID","Password");
$mail->encrypt_body();
$mail->build_message();
$mail->send('Your Name', 'hide@address.com', 'PGP Encryption Test', 'hide@address.com', 'PGP Encryption Class Test');
echo done;

?>
Return current item: pgp_enc.Class