import($key); // Add the key $gpg->addencryptkey($fingerprint); // Encryt the message $encrypted_message = $gpg->encrypt("Name: $name\nE-mail: $email\n\nMessage: $message"); $headers = "From: \"Contact form\" <$recipient>" . "\r\n" . "Reply-To: $email" . "\r\n" . "Content-Type: text/plain; charset=UTF-8" . "\r\n" . "X-Mailer: PHP/" . phpversion(); // Send the mail (this requires a fully working SMTP-server on the host) mail($recipient, $subject, $encrypted_message, $headers); ?> Your message has been sent

Your message has been sent

Thank you for your message
Best regards, NNN