Message body is empty in email

David Delisle
Sat Feb 23 19:24:02 2002

I am trying to encrypt form data and then email this data to myself.

The email is sent correctly, but the body of the email message is completely
empty. Any help would be greatly appreciated. Following is my code (I am
using PHP as the programming language):

               //Set variables

                //Directory containing the key ring
                $gnupghome = "/var/www/vhosts/";
                $gpg = "/usr/local/bin/gpg";
                $recipient = "John Doe <>";
                $to = "";
                $subject = "Test";
                $message = "This is a test";

                //Set the environment variable for GNUPGHOME

                $command = "$gpg --armor -t --always-trust --batch --no-tty
                $command .= "--compress-algo 1 --cipher-algo cast5 ";
                $command .= "--recipient '$recipient' ";
                $command .= "--encrypt ";
                $command .= "| /bin/mail -s '$subject' $to";
                $pp = popen($command, "w");
                fputs($pp, $message);

Thank you,

David Delisle