Can anyone see why this wouldn't work? I get the mail but it is always blank. The key
is installed on the server properly (so I am told). Basically the encrypting of the message
seems to be the only thing that doesn't work. I have stepped through it many times and
the message is fine until it gets encrypted then it becomes blank. I should at least be able
to echo it to the screen or get it in the mail and see it encrypted but I can't.
TIA,
Kelly
$message2 is the content of the email just text
$message2 = "Foo";
$subject = "This is my subject";
$headers2 = "";
$headers2 .= "MIME-Version: 1.0\r\n";
$headers2 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers2 .= "From: " . $sender_name . " <" . $admin_email . ">\r\n";
$headers2 .= "To: " . $sender_name . " <" . $admin_email . ">\r\n";
$headers2 .= "Reply-To: " . $name . " <" . $email . ">\r\n";
$gpg = 'correct path to gnupg ';
$recipient = "email for pub key";
$encrypted_message = base64_encode(shell_exec("echo $message2 | $gpg -e -r $recipient"));
mail("", $subject, $encrypted_message, $headers2);