Apache-App-Mercury
view release on metacpan or search on metacpan
$self->{'state'} = 'message_center';
$self->show_mail_center;
$controller->sitemark('/messaging');
} elsif ($q->param('message_center')) {
$self->{'state'} = 'message_center';
$self->show_mail_center;
$controller->sitemark('/messaging');
} elsif ($self->{'state'} eq 'edit_settings' or $args{'edit_mail_prefs'}) {
if ($q->param('add_box')) {
if ($self->verify_new_mailbox($q->param('new_box'))) {
$self->add_new_mailbox($q->param('new_box'));
$self->checkmail;
$q->delete('new_box');
}
} elsif ($q->param('delete_box')) {
$self->delete_mailbox($q->param('custom_box'),
$q->param('delete_mail_in_box'));
$self->checkmail;
$q->delete('custom_box');
$q->delete('delete_mail_in_box');
} elsif ($q->param('commit_filter')) {
$self->edit_filters;
$self->checkmail;
# $q->delete('trans_filter');
} elsif ($q->param('update_auto_forward')) {
$self->update_auto_forward;
$self->checkmail;
}
$self->{'state'} = 'edit_settings';
$self->show_mail_settings;
$controller->sitemark('/messaging.settings');
} elsif ($self->{'state'} eq 'compose_message') {
$self->save_compose_message_fields;
$controller->sitemark('/messaging.compose');
$controller->infomsg("You must take action on your existing composition before creating a transaction-related message.")
if ($q->param('reply_trans') or $q->param('compose_trans'));
delete $self->{'inbox'};
$self->set_sortby('inbox', $sortby, $sortdir);
$self->makebox('inbox');
}
$self->{'current_box'} = 'inbox' if $self->{'current_box'} eq $old_box;
$controller->infomsg(ucfirst($old_box)." has been deleted".($delete_mail_in_box ? " along with the $num_displaced messages stored there." : ". The $num_displaced messages stored there have been moved to your Inbox."));
}
}
sub edit_filters {
my ($self) = @_;
my $q = $self->{q};
if ($q->param('trans_filter') and
$q->param('trans_filter') ne $self->{user_manager}->mail_trans_filter) {
$self->{user_manager}->mail_trans_filter($q->param('trans_filter'));
}
}
sub remove_filters_for {
1;
__END__
=head1 NAME
Apache::App::Mercury - Internal web messaging for Apache mod_perl (1.x)
=head1 SYNOPSIS
# first, edit Apache/App/Mercury/Config.pm and set variables appropriately
# from the mod_perl handler of your application
# Note: in these examples My::MVC::Controller is assumed to be a class
# which provides a persistence framework so object variables are kept
# across http requests; it also must implement some predefined methods
# (see below for details on these methods)
$controller = My::MVC::Controller->new;
$controller->handler;
...
Mercury/Config.pm view on Meta::CPAN
use constant MIME_FOOTER =>
'
____________________________________________________________________________
This message has been automatically forwarded to you by Apache::App::Mercury
according to your current user settings.
To discontinue receiving these auto-forwarded e-mail messages, login
and change your mail preferences:
'.BASE_URL.BASE_URI.'?edit_mail_prefs=1
If you do not have an account at this site, or otherwise believe you have
received this message in error, please send e-mail to
<'.ADMIN_EMAIL.'> with the word "remove" in the subject line.
____________________________________________________________________________
';
# --------------------- END USER CUSTOMIZABLE VARIABLES --------------------
Mercury/Display.pm view on Meta::CPAN
my $msg_in_progress =
ref $self->{compose_msg} eq "Apache::App::Mercury::Message";
return
($q->table
({-cellspacing => 0, -cellpadding => 0,
-border => 0, -bgcolor => '#cccccc'},
$q->Tr
([$q->td({-align => 'right'},
$q->font({-size => '-1'},
$q->a({-href => BASE_URI.'?edit_mail_prefs=1'},
"Edit mail settings"))),
$q->td({-align => 'right'},
$q->hr({-width => '50%', -align => 'right', -size => 1})),
$q->td({-align => 'right'},
$q->font({-size => '-1'},
$q->submit('check_mail', "Check mail"))),
$q->td({-align => 'right'},
$q->font({-size => '-1'},
$q->em("Mail last checked at:".$q->br.
$q->u($last_time)))),
Mercury/Display.pm view on Meta::CPAN
? ($q->td({-align => 'right'},
$q->font({-size => '-1'},
(@transfer_boxes
? ($q->submit('transfer',
"Transfer selected messages") .
$q->br. "to Mailbox: ".
$q->popup_menu(-name => 'to_mailbox',
-values => \@transfer_boxes,
-labels => $labels))
: ($q->em("You can ".
$q->a({-href => BASE_URI.'?edit_mail_prefs=1'},
"create custom mailboxes")."."))))),
$q->td({-align => 'right'},
$q->hr({-width => '50%',-align =>'right',-size => 1})))
: () )),
$q->td({-align => 'right'},
$q->font({-size => '-1'},
$q->submit('delete',"Delete selected messages")))
])
)
);
( run in 0.527 second using v1.01-cache-2.11-cpan-de7293f3b23 )