| \n"; print " |
| \n"; print "\n"; print " | \n"; print "\n"; print "\n"; print " | \n"; if (@folders > 1) { print "\n"; print " | \n"; } print "\n"; } print " | \n"; print " |
\n";
}
print "",&text('view_desc', $in{'idx'}+1,
$folder->{'name'}),"\n";
if ($in{'idx'} < @mail-1) {
print "",
"
\n";
}
}
else {
print "$text{'view_sub'}\n";
}
print "\n"); } } close(INw); close(OUTr); if (@errs) { # Spelling errors found! &header($text{'compose_title'}, ""); print "
\n"; print @errs; print "
$rv")); } @attach = ( { 'data' => $tempbody, 'headers' => $tempheaders }, { 'data' => $sigdata, 'headers' => [ [ "Content-Type", "application/pgp-signature; name=signature.asc" ] ] } ); } $mail->{'attach'} = \@attach; if ($in{'crypt'} ne '' && !$in{'draft'}) { # Encrypt the entire mail &foreign_require("gnupg", "gnupg-lib.pl"); local @keys = &foreign_call("gnupg", "list_keys"); local $key; if ($in{'crypt'} == -1) { # Find the key for the To: address local ($to) = &address_parts($in{'to'}); foreach $k (@keys) { $key = $k if ($k->{'email'} eq $to); } &error(&text('send_ekey', $to)) if (!$key); } else { $key = $keys[$in{'crypt'}]; } local $temp = &tempname(); &send_mail($mail, $temp); local ($tempdata, $buf); open(TEMP, $temp); local $dummy =
$rv")); # Put into new attachments format $mail->{'headers'} = [ ( grep { lc($_->[0]) ne 'content-type' } @{$mail->{'headers'}} ), [ 'Content-Type', 'multipart/encrypted; protocol="application/pgp-encrypted"' ] ]; $mail->{'attach'} = [ { 'headers' => [ [ 'Content-Transfer-Encoding', '7bit' ], [ 'Content-Type', 'application/pgp-encrypted'] ], 'data' => "Version: 1\n" }, { 'headers' => [ [ 'Content-Transfer-Encoding', '7bit' ], [ 'Content-Type', 'application/octet-stream' ] ], 'data' => $crypted } ]; } # Check for text-only email local $textonly = $userconfig{'no_mime'} && @{$mail->{'attach'}} == 1 && $mail->{'attach'}->[0] eq $bodyattach; if ($in{'draft'}) { # Save in the drafts folder ($dfolder) = grep { $_->{'drafts'} } @folders; &lock_folder($dfolder); if ($in{'enew'} && $folder eq $dfolder) { # Update existing draft mail @oldmail = &mailbox_list_mails($in{'idx'}, $in{'idx'}, $dfolder); $oldmail = $oldmail[$in{'idx'}]; &mailbox_modify_mail($oldmail, $mail, $dfolder, $textonly); } else { # Save as a new draft &write_mail_folder($mail, $dfolder, $textonly); } &unlock_folder($dfolder); } else { # Send it off and optionally save in sent mail &send_mail($mail, undef, $textonly); if ($userconfig{'save_sent'}) { local ($sfolder) = grep { $_->{'sent'} } @folders; &lock_folder($sfolder); &write_mail_folder($mail, $sfolder, $textonly) if ($sfolder); &unlock_folder($sfolder); } } &header($text{'send_title'}, ""); print "
",&text($in{'draft'} ? 'send_draft' : 'send_ok', "".&html_escape($in{'to'}).""),"
\n"; print "
",&text($in{'field'} =~ /^\!/ ? 'search_results3' : 'search_results2', scalar(@rv), "$in{'match'}"),"
\n"; if (@rv) { print "
\n"; } else { print "$text{'search_none'}
\n"; } print "
| $text{'address_addr'} | \n"; print "$text{'address_name'} |
| "; $href = ""; } else { $td = " | "; $href = ""; } print $td,$href,$a->[0]," | \n"; print $td,$href,($a->[1] ? $a->[1] : "
\n"; } print "