<?php
$gpg = '/usr/bin/gpg';
$gpgrecipient = 'email';
$mailrecp = 'email';
$plain = 'Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text Here is the encrypted Text Here is the encrypted Text Here is the
encrypted Text';
$plain = escapeshellarg($plain);
$cmd = "echo -n {$plain} | {$gpg} --no-auto-check-trustdb --lock-never -e -a -r {$gpgrecipient} ";
echo $cmd;