Code Search for Developers
 
 
  

import_csv_save.html from AlphaMail at Krugle


Show import_csv_save.html syntax highlighted

% # vim:set syntax=mason:
<%args>
$cancel => 0
@line => ()
@entry => ()
</%args>
<%init>
my $message ="";

if($cancel) {
   $m->redirect("$base/mail/index.html");
}

my $user = Apache2::SiteControl->getCurrentUser($r);
my $book = new AlphaMail::AddressBook($user->getUsername(), $user->getAttribute('mx'), $config);

eval {
   for my $n (@line) {
      $logger->debug("Merging line $n: $entry[$n]");
      my $entry = (Email::Address->parse($entry[$n]))[0];
      # silent failure for duplicates
      if(defined($entry)) {
         $book->add_address($entry->phrase, $entry->address);
      } else {
         $logger->error("Could not add entry for $entry[$n], line $n");
      }
   }
   $message = "Your address book was successfully merged.";
};
if($@) {
   $logger->error("failed: $@");
   $message = "Error. Could not import address book.";
}

$book->save;

$m->redirect(build_url("$base/mail/addressbook/index.html", { selected => 'Contacts',
   message => $message }));
</%init>
<%once>
use AlphaMail::HTMLHelper qw(build_url);
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

  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