There is Mail::GPG which seems like a good place to start. Are you looking at using that and having issues, or are you trying one of the general-purpose GPG or PGP modules?

If you're using a plain file-system based encryption module with which you're already familiar, I'd recommend at least considering encrypting the message with that then just attaching the encrypted message as a regular file with a general MIME-related mail module. You don't get exactly the same support from the MIME system for your encryption that way on the receiving end, though. If you control the receiving end that shouldn't be a problem.

While end-to-end encryption of the message payload solves certain problems, you might want to consider TLS mail as well. There is a Net::SMTP::TLS module that comes in handy there. There are also other modules that use it, like Email::Send::SMTP::TLS (which I've never used). I hacked on the NMS formmail program to get it to support Net::SMTP::TLS as a sending engine, though. If your email path always uses SSL or TLS anyway, this might not be necessary.

As far as good general mail modules that handle MIME, MIME::Lite is very popular for sending. Mail::Sender gets some praise, too. Mail::Builder looks promising but I haven't heard much from people using it. There are other modules for parsing MIME emails on the receiving end if you need to do that, too.


In reply to Re: Module recommendations to send encrypted email by mr_mischief
in thread Module recommendations to send encrypted email by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.