How can I send gpg encrypted mail automatically from the linux command line?
try something like
gpg -ea -r "Recipient name" -o - filename | mail -s "Subject line" [email protected]
to send an ascii-armored, public-key-encrypted copy of the file "filename" to a person named "Recipient name" (who is in your gpg keyring) at email address [email protected] with the specified subject line.
or
echo "Your secret message" | gpg -ea -r "Recipient name" | mail -s "Subject" [email protected]
to send text directly rather than from a cleartext file on disk.