I understand you can encrypt the message with gpg2 and then send the message with the CLI (perl based) script sendxmpp [1].
BASE64_OPENPGP_MESSAGE=$(echo "message" | gpg | b64)"
echo "r <message to='juliet@example.org'><openpgp xmlns='urn:xmpp:openpgp:0'>${BASE64_OPENPGP_MESSAGE}</openpgp></message>" | txmppc