No, the built-in script cannot do this. Your best bet is to create either a custom alert script or modify the built-in to call eg. a Java program that does the encryption. You could use the Bouncy Castle Library to encrypt the content. It should be suitable for both PGP and SMIME.
You might also want to look at M2Crypto for S/MIME, or write the body out to a file and call gpg directly from Python. You'll have to write some code, but this might help with ideas - http://stackoverflow.com/questions/1020320/how-to-do-pgp-in-python-generate-keys-encrypt-decrypt