I've modified Benjamin Trott's STAMP script to send HTML form submissions as FDF files, using the PDF::FDF::Simple module. (This after failed attempts to install Adobe's FDF Toolkit.) But I want to send the FDF data as an encrypted attachment.

This MIME::Lite object works fine for sending the unencrypted message:

my $body = $fdf->_fdf_header; foreach (sort keys %{$fdf->content}) { $body .= sprintf ($fdf->_fdf_field_formatstr, $_, $fdf->_quote($fdf->content->{$_})); } $body .=$fdf->_fdf_footer; my $msg = MIME::Lite->new( From =>$cfg->Email, To =>$cfg->To, Subject =>$cfg->Subject, Filename => 'test.fdf', Type =>'application/vnd.fdf', Encoding => 'binary', Data => $body; Disposition => 'attachment' );

Then I tried this:

my $msg = MIME::Lite->new( From =>$cfg->Email, To =>$cfg->To, Subject =>$cfg->Subject, Filename => 'test.pgp', Type =>'application/pgp-encrypted', Encoding => 'binary', Data => $body_encrypted, Disposition => 'attachment' );

This works, except in MS Outlook 2000 I have to save the attachment and type in the ".fdf" suffix. I was hoping to automate the process, so that I could just click on the attachment, enter my PGP password, and open the FDF file automatically. Any suggestions would be great.


In reply to Can MIME::Lite send PGP-encrypted attachments? by Carstonio

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.