Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: [brewt] View Header and SA Report Formatting

Quote Reply
Re: [brewt] View Header and SA Report Formatting In reply to
Oops
Never work when tired. My fault. Got the restart fine the header still however shows the same way. The code is as follows:

sub fold {
# --------------------------------------------------------------------------
my ( $tag, $line ) = @_;

##Fix For Header Wrapping @brewt::273642##


# Remove any newlines that shouldn't be in the header
$line =~ s/(?:\r?\n)+$//;
$line =~ s/(?:\r?\n)(?=[^\t ])/ /g;

# Don't fold if we don't need to
my $fold = 0;
for (split /$CRLF/, $line) {
if (length $_ > 72) {
$fold = 1;
last;
}
}
return $line unless $fold;

##Fix End ##

# First we unfold
$line =~ s/[\t ]*[\r\n][\t ]*/ /g;
my $key = lc $tag;

# Special case for TO fields
if ( $key eq 'to' or $key eq 'cc' or $key eq 'bcc' ) {
$line =~ s/,[\t ]+/,$CRLF /g if length $line > 72;
return $line
}

# We have nothing to wrap on :(
if ( $line !~ /\s/ ) {
return $line;
}

# Line does not need wrapping
# if ( length( $line ) <= 72 ) {
# return $line;
# }

And a Test Mail Header Looks Like This (same as before):

Content analysis details:
(0.0 points, 7.0 required) pts rule name description ----
----------------------
-------------------------------------------------- 0.0 RCVD_BY_IP
Received by mail server with no name -0.0 SPF_HELO_PASS
SPF: HELO matches SPF record
X-Spam-Score: 0.0

HyTC

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Subject Author Views Date
Thread View Header and SA Report Formatting HyperTherm 4482 Sep 22, 2004, 1:32 AM
Thread Re: [HyperTherm] View Header and SA Report Formatting
brewt 4408 Sep 22, 2004, 1:48 AM
Thread Re: [brewt] View Header and SA Report Formatting
HyperTherm 4400 Oct 2, 2004, 4:15 AM
Post Re: [HyperTherm] View Header and SA Report Formatting
HyperTherm 4382 Oct 11, 2004, 4:16 AM
Thread Re: [HyperTherm] View Header and SA Report Formatting
brewt 4358 Oct 13, 2004, 12:47 PM
Thread Re: [brewt] View Header and SA Report Formatting
HyperTherm 4357 Oct 13, 2004, 6:48 PM
Thread Re: [HyperTherm] View Header and SA Report Formatting
brewt 4352 Oct 13, 2004, 8:19 PM
Post Re: [brewt] View Header and SA Report Formatting
HyperTherm 4362 Oct 13, 2004, 8:53 PM
Thread Re: [brewt] View Header and SA Report Formatting
HyperTherm 4330 Oct 16, 2004, 10:26 PM
Thread Re: [HyperTherm] View Header and SA Report Formatting
brewt 4330 Oct 16, 2004, 11:13 PM
Thread Re: [brewt] View Header and SA Report Formatting
HyperTherm 4312 Oct 21, 2004, 7:27 AM
Post Re: [HyperTherm] View Header and SA Report Formatting
brewt 4307 Oct 26, 2004, 5:15 PM