hi,
I have gotten gnupg installed and i have it working fine for the most part the problem i am having is that i cant attach the file as the body of a email. I have to send it as a attachment.
when i try to just fopen then fread the encrypted file into a $message variable that pass to the mail function i always get less than the whole message and it never can be opened with pgp. But if i attach the file as a binary attachment i can save the file and decrypt it with pgp.
how do i get the encrypted stuff into the body though and not as a attachment
// encrypt the file
system(\"/usr/local/bin/gpg --homedir /var/www/.gnupg --output $filename.gpg --encrypt --recipient \".$customer[0][\"gnupguid\"].\" $filename.txt &> /tmp/error\");
system(\"cat $filename.gpg | mail -s \\"\".$customer[$custid][\"subject\"].\"\\" \".$customer[$custid][\"forwardemail\"].\"\");
i have also tried something to the effect of:
$fd = fopen(\"yourfile\", \"r\");
$message = fread($fd, filesize(\"yourfile\"));
mail($reciipt, \"Subject\", \"$message\");
thanks for any help
jake