summaryrefslogtreecommitdiff
path: root/rt/bin/rt-mailgate.in
diff options
context:
space:
mode:
Diffstat (limited to 'rt/bin/rt-mailgate.in')
-rw-r--r--rt/bin/rt-mailgate.in20
1 files changed, 6 insertions, 14 deletions
diff --git a/rt/bin/rt-mailgate.in b/rt/bin/rt-mailgate.in
index b125a94..72cada6 100644
--- a/rt/bin/rt-mailgate.in
+++ b/rt/bin/rt-mailgate.in
@@ -172,7 +172,6 @@ sub setup_session {
my $self = shift;
my $opts = shift;
my %post_params;
- $post_params{SessionType} = 'REST'; # Surpress login box
foreach (qw(queue action)) {
$post_params{$_} = $opts->{$_} if defined $opts->{$_};
}
@@ -253,20 +252,13 @@ sub check_failure {
my $r = shift;
return if $r->is_success;
- # This ordinarily oughtn't to be able to happen, suggests a bug in RT.
- # So only load these heavy modules when they're needed.
- require HTML::TreeBuilder;
- require HTML::FormatText;
+ # XXX TODO 4.2: Remove the multi-line error strings in favor of something more concise
+ print STDERR <<" ERROR";
+An Error Occurred
+=================
- my $error = $r->error_as_HTML;
- my $tree = HTML::TreeBuilder->new->parse($error);
- $tree->eof;
-
- # It'll be a cold day in hell before RT sends out bounces in HTML
- my $formatter =
- HTML::FormatText->new( leftmargin => 0,
- rightmargin => 50, );
- print STDERR $formatter->format($tree);
+@{[ $r->status_line ]}
+ ERROR
print STDERR "\n$0: undefined server error\n" if $opts->{'debug'};
return $self->tempfail();
}