Q:

mail use gpg encryption

I would like to send emails encrypted with gpg from a shell script.
Is there any way to send emails with gpg? Or encrypt them using mail?

A:

You can use:
echo "Your message" | gpg -ea -r "Recipient name" | mail -s "Subject" recipient@example.com

Recipient name must to be is in your gpg keyring.
Source: How can I send gpg encrypted mail automatically from the linux command line?

