email encrypted form

Brandon Rasler brandon@mennotrav.com
Thu Nov 29 17:18:01 2001


I am trying to email an encrypted form using this script.

open(MAIL, "|/home/menno/bin/gpg --homedir /home/menno/.gnupg -a -r
'0x8ED34D6B' -e --no-secmem-warning -|/usr/sbin/sendmail -t
user\@domain.com") || die ("can't open sendmail");
print MAIL "You Said: $FORM{ 'line' }\n";
close(MAIL);

It is working fine but I have several forms and I would like to add headders
so I know which form it is from.

How would I add headders before running gpg?

I tried the following with no luck.

{
open(MAIL, "|/usr/sbin/sendmail -t user\@domain.com") || die ("can't open
sendmail");
print MAIL "From: Secure_Form_1\n";
print MAIL "To: user\@domain.com\n";
print MAIL "Subject: Results from Secure Form 1\n";
print MAIL "Content-type:text/plain\n";
{
open(OUT, "|/home/menno/bin/gpg --homedir /home/menno/.gnupg -a -r
'0x8ED34D6B' -e --no-secmem-warning -");
print OUT "You Said: $FORM{ 'line' }\n";
close(OUT);
}
close(MAIL);
}

Any Ideas?