Show filevault.html syntax highlighted
% # vim: set syntax=mason:
<%args>
$to => ''
$cc => ''
$bcc => ''
$subject => ''
$message => ''
$forward => ''
$ref => ''
@attachments => ()
@sizes => ()
$error => 0
$reply => 0
</%args>
<& /mail/header.mhtml, message => $message, title => 'File Vault', compose => 1 &>
<form method="post" action="/mail/process_filevault.html"
enctype="multipart/form-data">
<p>FileVault allows you to temporarily store large files that are too big
for mail attachments so that a remote recipient can download them. When
you send a file with FileVault, a URL will be embedded in the outgoing
message so that the recipient can click on it to download the file.</p>
<p>In order to help insure your privacy, the file will be encrypted on
the server using a key that will be sent in the email message. Only a
user that possesses this key will be able to download the file.</p>
<p>If you are sending a particularly sensitive file, you can choose to
write down the key locally, and delete it from the outgoing message. This
would mean that you would use some other mechanism to transfer the key to
the recipient so they could download the file (i.e. you call the person
and read them the key over the phone.)</p>
<input name="message" value="<% $message |h %>" type="hidden">
<input name="to" value="<% $to |h %>" type="hidden">
<input name="cc" value="<% $cc |h %>" type="hidden">
<input name="bcc" value="<% $bcc |h %>" type="hidden">
Embed the key in the message? Yes: <input name="embedkey" type="radio" value="1"> No: <input name="embedkey" type="radio" value="0">
<input name="upload" type="file">
<input type="submit" name="upload" value="Upload File">
% if(@attachments) {
% for(my $i =0; $i < $#attachments+1; $i++) {
<% $attachments[$i] %> (<% $sizes[$i] %> bytes)<br>
<input type="hidden" name="attachments" value="<% $attachments[$i] |h %>">
<input type="hidden" name="sizes" value="<% $sizes[$i] |h %>">
% }
% }
</form>
<script language="javascript">
<!--
document.forms[0].message.selectionStart = 0;
document.forms[0].message.selectionEnd = 0;
// -->
</script>
<& /mail/footer.mhtml &>
<%init>
my $user = Apache::SiteControl->getCurrentUser($r);
my $folder = $user->getAttribute('lastfolder') || 'inbox';
my $book = new AlphaMail::AddressBook($user->getUsername(), $user->getAttribute('imap'), $config);
my $sigs = new AlphaMail::Signature($user->getUsername(), $user->getAttribute('imap'), $config);
my $ab = $book->get;
my $jsinit;
if(!$message) {
$message = "\n" . $sigs->getSignature;
}
local $" = ", ";
for my $k (keys %$ab) {
$jsinit .= qq("@{$ab->{$k}} ($k)",);
}
$jsinit =~ s/,\s*$//;
</%init>
See more files for this project here