in reply to email encryption

Sendmail alone can't send encrypted email. You need to use another tool to encrypt the email, and then send it using sendmail (or some other means). Typical packages used to encrypt email before sending include pgp (a for-pay product) and gpg (gnupg, an open source version of pgp).

If you're doing batch processing, you can either have perl open a pipe to pgp or gpg, or use the GnuPG modules (which can be found in CPAN) to interface gpg through perl.

If you're just trying to read and send encrypted mail as an end user, both gpg and pgp have some hooks into common mail clients.

Alan