Code Search for Developers
 
 
  

addresslist.html from AlphaMail at Krugle


Show addresslist.html syntax highlighted

% # vim:set syntax=mason:
<& /mail/header.mhtml, title => "Address List" &>
<form method="post" action="<% $base %>/mail/address_mail.html">
   <div class="controls">
      <input type="submit" name="address" value="Done">
   </div>
   <div class="heading">
      Address Mail
   </div>
   <div class="subheading">Individual Addresses</div>
   <div class="section">
   <table class="addresslist">
      <tr><th>To</th><th>Cc</th><th>Bcc</th><th>Address</th></tr>
% for my $k (sort { $sorter->cmp(mimewords_to_utf8($addresses->{$a}->phrase), mimewords_to_utf8($addresses->{$b}->phrase)) } keys %{$addresses}) {
      <tr>
         <td>
%    if(grep { $addresses->{$k}->address eq $_->address } @to_addr) {
            <input type="checkbox" name="tolist" value="<% $k |h %>" checked>
%    } else {
            <input type="checkbox" name="tolist" value="<% $k |h %>">
%    }
         </td>
         <td>
%    if(grep { $addresses->{$k}->address eq $_->address } @cc_addr) {
            <input type="checkbox" name="cclist" value="<% $k |h %>" checked>
%    } else {
            <input type="checkbox" name="cclist" value="<% $k |h %>">
%    }
         </td>
         <td>
%    if(grep { $addresses->{$k}->address eq $_->address } @bcc_addr) {
            <input type="checkbox" name="bcclist" value="<% $k |h %>" checked> 
%    } else {
            <input type="checkbox" name="bcclist" value="<% $k |h %>"> 
%    }
         </td>
         <td>
            <% $addresses->{$k}->format |h %>
         </td>
      </tr>
% }
   </table>
   </div>
   <div class="subheading">Mailing Lists</div>
   <div class="section">
   <table class="addresslist">
      <tr><th>To</th><th>Cc</th><th>Bcc</th><th>List</th></tr>
% my @listnames = keys %{$lists};
% for my $k (sort { $sorter->cmp(mimewords_to_utf8($a), mimewords_to_utf8($b)) } @listnames) {
      <tr>
         <td>
%    if(grep { $composition->{to} =~ m/(^|,)\s*\Q$_\E\s*(,|$)/ } @listnames) {
            <input checked type="checkbox" name="tolist" value="<% $k |h %>">
%    } else {
            <input type="checkbox" name="tolist" value="<% $k |h %>">
%    }
         </td>
         <td>
%    if(grep { $composition->{cc} =~ m/(^|,)\s*\Q$_\E\s*(,|$)/ } @listnames) {
            <input checked type="checkbox" name="cclist" value="<% $k |h %>">
%    } else {
            <input type="checkbox" name="cclist" value="<% $k |h %>">
%    } 
         </td>
         <td>
%    if(grep { $composition->{bcc} =~ m/(^|,)\s*\Q$_\E\s*(,|$)/ } @listnames) {
            <input checked type="checkbox" name="bcclist" value="<% $k |h %>"> 
%    } else {
            <input type="checkbox" name="bcclist" value="<% $k |h %>"> 
%    } 
         </td>
         <td>
            <% mimewords_to_utf8($k) |h %> : <% join(", ", map { mimewords_to_utf8($_->format) } @{$lists->{$k}}) |h %>
         </td>
      </tr>
% }
   </table>
   </div>
   <div class="controls">
      <input type="submit" name="address" value="Done">
   </div>
</form>
<& /mail/footer.mhtml &>
<%init>
my $user = Apache2::SiteControl->getCurrentUser($r);
my $book = new AlphaMail::AddressBook($user->getUsername(), $user->getAttribute('mx'), $config);
my $addresses = $book->get_all->{addresses};
my $lists = $book->get_all->{lists};
my $composition = new AlphaMail::Message($user, $config);
$composition->load();
my @to_addr = Email::Address->parse($composition->{to});
my @cc_addr = Email::Address->parse($composition->{cc});
my @bcc_addr = Email::Address->parse($composition->{bcc});
</%init>
<%once>
use AlphaMail::MailTool qw(mimewords_to_utf8);
our $logger = Log::Log4perl->get_logger('alphamail');
our $base = $config->get('base_uri');
</%once>




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  addressbook/
    edit.mhtml
    import.mhtml
    import_complete.html
    import_csv.html
    import_csv_save.html
    import_fname.html
    import_imho.html
    import_lname.html
    index.html
    lists.mhtml
    process_edit.html
    process_lists.html
    process_take.html
    take.html
  admin/
    autohandler
    index.html
    show_stats.mhtml
    test.mhtml
  docs/
    faq/
      colors.gif
      dates1.gif
      drafts.gif
      filter.gif
      general.html
      index.html
      notrash1.gif
      notrash2.gif
      notrash3.gif
      other.html
      sort.gif
      timeout.gif
    new_features.html
  settings/
    add_filter.html
    altfolder_update.html
    altprefix_update.html
    edit_folders.html
    export.mhtml
    export_mail.html
    filters.mhtml
    folders.mhtml
    general.mhtml
    index.html
    share.mhtml
    sharing_agree.html
    signatures.mhtml
    update_folderlist.html
    update_general.html
    update_signatures.html
  viewers/
    excel.html
    html.html
    targz.html
    text.html
    word.html
    zip.html
  address_mail.html
  addresslist.html
  autohandler
  check_spelling.html
  compose.html
  feedback.html
  first_login.html
  fix_spelling.html
  folderlist.mhtml
  footer.mhtml
  get_attachment.html
  header.mhtml
  help.html
  index.html
  logout.html
  menu.mhtml
  other_folders.html
  process_compose.html
  process_first_login.html
  process_messages.html
  process_read_message.html
  process_search.html
  quota.html
  quota_graph.html
  raw.html
  read.html
  remove_attachment.html
  renew_session.html
  resume_compose.html
  sanitized.html
  share_options.html
  share_upload.html
  verify_password.html
  view_attachment.html